Feature request: Support --prune
feature when execute zarf package deploy
to delete needless helm chart or manifest
#2992
Labels
enhancement ✨
New feature or request
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
Day 1: I defined my application's Helm charts and images using zarf.yaml, then packaged them into a .zst archive. I deployed it to my cluster in an air-gapped environment, and it worked very well
like this:
Day 2: My application was updated, but only some images and manifests were changed. I repackaged my Zarf package, from 0.1.1 to 0.1.2, and executed
zarf package deploy
to deploy it to the cluster. It worked very well.Day 3: My application was updated again, with more changes this time. I needed to remove the
httpd
Helm chart, so I created a new Zarf package, from 0.1.2 to 0.2.0, and executedzarf package deploy
again. However, the resources associated with thehttpd
Helm chart were not deleted.If this was the manifest file, I think it would be the same
Therefore, I wonder if it's possible to add a
--prune
option tozarf package deploy
to support the deletion of unnecessary resources from the new version of the package.This may also be integrated with the
zarf tools registry prune
to automatically upgrade applications and clean up unwanted resourcesDescribe alternatives you've considered
Of course, I can define different Helm charts and manifests as separate components and then use
zarf package remove --component
to delete specific components.However, this is somewhat cumbersome. It would be more convenient if
zarf.yaml
could provide a way to declare certain components to be removed before deployment. This way,zarf package deploy
could automatically remove those components, making the process more convenient.The text was updated successfully, but these errors were encountered: