New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
retaining specific resources on stack deletion #2211
Comments
Hi @errordeveloper thanks for you question! I think this would be quite a wide-ranging change which would be a core Pulumi change, rather than just for this provider. One suggestion that comes to mind could be to utilize Pulumi's transformations - which allow you to make changes dynamically to resource arguments and options. This should allow you to set the retainOnDelete across a range of resources, just in specific scenarious. Would this achieve what you're wanting? |
@danielrbradley yeah, looks like transformations will help. I would still advocate for a way to making a distinction between resource deletions and complete stack deletions, I think it metters very specifically for Kubernetes resources, as it's often not needed to remove resources from the cluster when underlying cluster itself is about to be deleted. Not sure if a transformation can handle this? Maybe it doesn't need to be about "stack deletion", it could be about deletion of parent... |
This PR has had some discussion recently which is working in a similar direction pulumi/pulumi#11095 |
@danielrbradley thanks! Also related: pulumi/pulumi#11126. |
I am currently creating a GKE cluster and deploying Flux for manifests.
The manifest contain a few CRDs as well as CRs. Deletion is tricky due to CRDs and CRs, as well as namespaces in terminating state.
Perhaps the answer is to defined Flux resources natively in Pulumi, and perhaps this is feasible for this particular project, given its popularity, however a general issue ramains for other software.
I have to resort to using
retainOnDelete
on allConfigGroup
, but I wish I could set it only on specific types, namely namespaces, CRDs and perhaps CRs also. I also wish I could set it only for the cases where entire stack is being deleted, but it seems to be scoped to just the resources that it is set on.I suppose it'd help to have the following options, even if these are just for
ConfigGroup
andConfigFile
in the Kubernetes provider (I'm not quite sure if there are wider use-cases).ratainOnStackDelete: bool
retainOnDelete: function(name: string, type: string): bool
The text was updated successfully, but these errors were encountered: