eks: ack prop for potential cluster replacement #30107
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
Describe the feature
aws-eks.Cluster has some cluster props that would result in cluster replacement on prop update.
aws-cdk/packages/@aws-cdk/custom-resource-handlers/lib/aws-eks/cluster-resource-handler/cluster.ts
Lines 116 to 130 in 3928eae
And users can hardly tell that from
cdk diff
orcdk deploy
as the cluster resource is actually a custom resource and we just notice the custom resource props change in this case.We only notice that the custom resource would change but in fact the existing cluster would be torn down and replaced, resulting data loss.
I think we should have a gatekeeper prop which default value is
false
and only when you explicit set it astrue
will the cluster replacement happen.Use Case
as above
Proposed Solution
I was thinking maybe we can have a removalPolicy prop of the cluster which default to
RETAIN
and the cluster replacement would only happen when the value isDESTROY
Another option is to have a
replaceOnUpdate
orallowReplaceOnUpdate
prop for eks.Cluster which defaults tofalse
.Other Information
No response
Acknowledgements
CDK version used
all
Environment details (OS name and version, etc.)
all
The text was updated successfully, but these errors were encountered: