devantler-tech / devantler-tech/ksail
EKS regional delete removes a same-named cluster's TTL in other regions
- Dominant language
- Go
- Stars
- 165
- Forks
- 12
- Avg merge
- 5h 41m
- Merged PRs (30d)
- 337
Description
> 🤖 Generated by the Agentic Engineer
## Evidence
A cluster's TTL is stored as one file per cluster name, `~/.ksail/clusters//ttl.json`, with no region in the path. `SaveClusterTTL`, `LoadClusterTTL` and `clusterTTLPath` all take only a name. `create`, `info` and `list` read and write it that way.
EKS cluster names are unique only within an AWS region. `DeleteEKSRegionState` (added in #6333) deliberately deletes this name-scoped TTL on every regional delete, so that a stale TTL cannot auto-delete or misconfigure a later same-named cluster. The same choice has a cost. Deleting the EKS cluster `demo` in `eu-north-1` also removes the TTL of a still-running `demo` in `us-east-1`.
This came up in review of devantler-tech/ksail#7028. That PR keeps same-named clusters' other state per region, but TTL was out of its scope.
## Affected audience and impact
EKS users who run same-named clusters in more than one region and rely on `--ttl`. After deleting one region's cluster, the other region's cluster silently loses its expiry. It is never auto-deleted, so billable resources can outlive the intended lifetime.
## Expected behaviour
A regional delete removes only that region's TTL. A same-named cluster in another region keeps its own expiry, and `info`/`list` show it.
## Acceptance criteria
- [ ] EKS TTL state is scoped by region, so deleting one region never removes another region's TTL.
- [ ] Existing name-scoped `ttl.json` files keep working, or are migrated safely, for non-EKS distributions and single-region EKS clusters.
- [ ] `create`, `info`, `list` and TTL-driven auto-delete read the region-scoped value for EKS.
- [ ] A test seeds TTLs for the same name in two regions, deletes one region, and asserts the other region's TTL survives.
## Rough size
Medium: a storage contract change plus consumer updates and compatibility for existing state.
Contributor guide
Research direction
Start by tracing SaveClusterTTL, LoadClusterTTL, clusterTTLPath, and DeleteEKSRegionState, then inspect how create, info, list, and TTL-driven auto-delete select state for EKS. Run the existing TTL and regional-delete tests before changing the storage contract. Done means same-named EKS clusters retain independent regional TTLs, while existing non-EKS and single-region state remains compatible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go, kubernetes
- Domain
- cli, cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100