Skip to content
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

Feature request: Support --prune feature when execute zarf package deploy to delete needless helm chart or manifest #2992

Open
Miaoxiang-philips opened this issue Sep 12, 2024 · 0 comments
Labels
enhancement ✨ New feature or request

Comments

@Miaoxiang-philips
Copy link
Contributor

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:

kind: ZarfPackageConfig
metadata:
  name: example-app
  description: Deploy example application
  version: 0.1.1
  architecture: amd64

components:
  - name: app-gateway
    required: true
    charts:
      - name: app-gateway
        version: 1.0.2
        namespace: app-gateway
        url: https://xxx.com/artifactory/helm-dev/
        releaseName: app-gateway
        valuesFiles:
          - helm-values/values-app-gateway.yaml
      - name: httpd
        version: 10.0.1
        namespace: httpd
        url: https://xxx.com/artifactory/helm-dev/
        releaseName: httpd
        valuesFiles:
          - helm-values/values-httpd.yaml
    images:
      - xxx.com/app-gateway:v1.1
      - httpd:alpine3.18

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 executed zarf package deploy again. However, the resources associated with the httpd 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 to zarf 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 resources

Describe 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.

@Miaoxiang-philips Miaoxiang-philips added the enhancement ✨ New feature or request label Sep 12, 2024
@github-project-automation github-project-automation bot moved this to Triage in Zarf Sep 12, 2024
@Miaoxiang-philips Miaoxiang-philips changed the title Request: Support --prune feature when execute zarf package deploy to delete needless helm chart or manifest Feature request: Support --prune feature when execute zarf package deploy to delete needless helm chart or manifest Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
Status: Triage
Development

No branches or pull requests

1 participant