Avoid using force apply
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 328
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 9
Description
**What would you like to be added**:
Avoid using `kubectl apply --force` from the CLI. Specially to apply changes to the eks-a resources.
**Why is this needed**:
`kubectl apply --force` follows the following behavior:
1. Generate the path/update in the same way it would for a normal `apply`
2. Try to patch the resource.
3. If step 2, fails delete the resource.
4. Recreate the resource using only the provided spec (without taking into account the current state of the resource)
This can be problematic, specially for eks-a cluster resources, where we have different validations to avoid users creating resources under certain conditions (without a paused annotation, etc.). When we start offering full lifecycle support, this can interfere with how the controller works, since deleting an eks-a cluster will trigger deleting the actual infrastructure and losing everything stored in that cluster.
Contributor guide
Research direction
Start by locating the CLI path that invokes kubectl apply --force for EKS-A resources, then read how those resources are applied and validated. Done means the CLI no longer uses force apply for these resources while preserving the safeguards around paused annotations and controller-managed lifecycle behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, kubernetes
- Domain
- cli, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100