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

helmchart resources no longer spawn helm-install jobs after update #3849

Closed
Stargeras opened this issue Jan 25, 2023 · 5 comments
Closed

helmchart resources no longer spawn helm-install jobs after update #3849

Stargeras opened this issue Jan 25, 2023 · 5 comments

Comments

@Stargeras
Copy link

Environmental Info:
RKE2 Version: 1.24.9+rke2r2

Node(s) CPU architecture, OS, and Version: N/A

Cluster Configuration: Single node

Describe the bug:
We upgraded from 1.24.7+rke2r1 to 1.24.9+rke2r2 and existing HelmChart resources are no longer spawning new helm-install jobs when modified. The HelmChart yaml files are in the manifests directory. Modifying the set: parameters in the files does result in the helmchart resource being updated accordingly, but a new job to update the chart never gets spawned.

Steps To Reproduce:

  • Install rke2 1.24.7+rke2r1
  • Place HelmChart manifest file inside of manifests directory
  • Update rke2 to 1.24.9+rke2r2
  • Modify a set: parameter in the helmchart manifest file
  • Verify new parameter in helmchart resource
  • Verify new job to update helmchart is not being created

Expected behavior:
Modifying the helmchart resource should spawn a new job to update the helm chart.

Actual behavior:
Modifying the helmchart resource does not spawn a new job to update the helm chart.

@brandond
Copy link
Member

brandond commented Jan 25, 2023

If the HelmChart resource is being changed, the Job resource should be changed as well. If the Job is changed then it is up to the core Kubernetes Job controller to kick off a new Pod to run the job.

  • Do you see any errors in the rke2-server logs?
  • Do you see the Job getting updated when the HelmChart resource is updated?
  • Do you see any errors in the kube-controller-manager pod logs?

@Stargeras
Copy link
Author

Thanks for the response!

I do not see the Job getting updated when the HelmChart resource is updated. I don't see any changes in the kube-controller-manager pod logs. I do see something interesting in the rke2 server logs though. I see the event for the updated manifest but then I see the following error:

`Jan 26 16:15:45 pserver24 rke2[30949]: I0126 16:15:45.104127 30949 event.go:294] "Event occurred" object="kube-system/rancher-chart" fieldPath="" kind="Addon" apiVersion="k3s.cattle.io/v1" type="Normal" reason="AppliedManifest" message="Applied manifest at "/var/lib/rancher/rke2/server/manifests/rancher-chart.yaml""

Jan 26 16:16:05 pserver24 rke2[30949]: W0126 16:16:05.361337 30949 reflector.go:324] k8s.io/[email protected]/tools/cache/reflector.go:167: failed to list *v1.HelmChart: json: cannot unmarshal bool into Go struct field HelmChartSpec.items.spec.set of type int32

Jan 26 16:16:05 pserver24 rke2[30949]: E0126 16:16:05.361389 30949 reflector.go:138] k8s.io/[email protected]/tools/cache/reflector.go:167: Failed to watch *v1.HelmChart: failed to list *v1.HelmChart: json: cannot unmarshal bool into Go struct field HelmChartSpec.items.spec.set of type int32`

@Stargeras
Copy link
Author

I figured it out. I updated a set in one of my manifests to have a boolean value (true). It's weird that it affected updates to all of the HelmChart resources and not just the one with the boolean.

@brandond
Copy link
Member

That is interesting, I wouldn't have expected that either. It is odd that the syntax was rejected when listing, not when creating.

@brandond
Copy link
Member

I created an issue to track this behavior on the helm-controller side; I'll close this out since you've resolved it on your side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants