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

how to upgrade helm charts defined in extensions helm section of k0s config #3071

Closed
acollign opened this issue May 5, 2023 · 3 comments · Fixed by #3082
Closed

how to upgrade helm charts defined in extensions helm section of k0s config #3071

acollign opened this issue May 5, 2023 · 3 comments · Fixed by #3082
Assignees
Labels
enhancement New feature or request

Comments

@acollign
Copy link

acollign commented May 5, 2023

Is your feature request related to a problem? Please describe.

I couldn't find a documentation that explains how to upgrade helm charts defined in the extension section of the k0s config.

I am trying to update a deployed helm chart by updating the version value in the "extensions helm" configuration section.

  extensions:
    helm:
      concurrencyLevel: 5
      repositories:
        - name: traefik
          url: https://traefik.github.io/charts
      charts:
        - name: traefik
          chartname: traefik/traefik
          version: "23.0.1" # previously 20.5.3
          namespace: default

I noticed that k0s does not upgrade the corresponding deployment even after a cluster restart. The traefik deployment annotations still refers to "helm.sh/chart=traefik-20.5.3"

https://docs.k0sproject.io/v1.27.1+k0s.0/helm-charts/

Describe the solution you would like

It would be awesome if the extension manager would allow updating charts. Also if upgrading is not supported, then it would be great to mention it in the documentation https://docs.k0sproject.io/v1.27.1+k0s.0/helm-charts/

Describe alternatives you've considered

Beside performing a fresh install, I have not found a working alternative

Additional context

No response

@muhlba91
Copy link

muhlba91 commented May 9, 2023

Interestingly, for my use case this behaviour is the one I'd like to achieve.
My setup is using k0s to bootstrap the cluster with cilium and ArgoCD but once the initial deployment is achieved, ArgoCD should take over management of all components - itself and cilium included. k0s(ctl) then is only responsible for managing the cluster nodes/components and upgrades of these but not more.

In fact, currently, this works like a charm since the initially defined Helm charts in k0s never get upgraded.
This fix will "break" this use case now. @makhov Is it possible to add an optional flag allowing to disable the upgrade of the a chart? Hence, only install it on the first bootstrapping?

@makhov
Copy link
Contributor

makhov commented May 10, 2023

@muhlba91 Interesting use case, I usually do the same, but don't update ArgoCD by itself.

Actually, k0s only takes care of charts.helm.k0sproject.io CRD objects and compares spec and status of the object to make a decision on if it needs to be updated or not:
https://github.com/k0sproject/k0s/blob/main/pkg/component/controller/extensions_controller.go#L284

So, if you don't update the chart object, it shouldn't update anything

@acollign
Copy link
Author

Thanks @makhov for backporting the fix.

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
None yet
Development

Successfully merging a pull request may close this issue.

3 participants