[aws-eks] Support object pruning #10495
Labels
@aws-cdk/aws-eks
Related to Amazon Elastic Kubernetes Service
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p1
pr/needs-community-review
This PR needs a review from a Trusted Community Member or Core Team Member.
Milestone
Use Case
Currently, situations may arise that leave orphan resources. For example, consider the following manifest:
When it is first deployed, we issue a
kubectl apply
command that creates both config maps.If we now remove one config map, i.e the manifest will look like so:
Since the CFN resource is the same, just its properties changed, an
UPDATE
call be executed by CFN, which will simply translate into akubectl apply
on the new manifest, which will not delete the config map that was removed from the manifest.Proposed Solution
Automatically add pruning labels to all resources and use
kubectl apply --prune
(seepruning objects
)Before running
kubectl apply
on update, runkubectl delete
on the previous manifest (available as as CFN property at invocation time)Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: