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

Helm release revision increased on every reconcile #295

Closed
mihaisee opened this issue Jul 9, 2021 · 2 comments
Closed

Helm release revision increased on every reconcile #295

mihaisee opened this issue Jul 9, 2021 · 2 comments

Comments

@mihaisee
Copy link

mihaisee commented Jul 9, 2021

Describe the bug

Each flux -n NAMESPACE reconcile helmrelease APP_NAME generates a helm install that increases helm REVISION (it also triggers hooks, of course).
No changes are being made between reconciles neither to the chart or the values.
I am passing the values in the HelmRelease through the values: with no reference to ConfigMaps or Secrets. Just plain text values.
The chart source is an internal ChartMuseum repository.

Also I have compared helm upgrade --install ... outputs and it doesn't have any random generated field or anything and there are no differences between outputs when the same values are provided.

I am running on versions:

flux version 0.16.0

► ghcr.io/fluxcd/helm-controller:v0.11.1
► ghcr.io/fluxcd/image-automation-controller:v0.14.0
► ghcr.io/fluxcd/image-reflector-controller:v0.11.0
► ghcr.io/fluxcd/kustomize-controller:v0.13.1
► ghcr.io/fluxcd/notification-controller:v0.15.0
► ghcr.io/fluxcd/source-controller:v0.15.3

How I reproduce

✘ mihai@devBox  helm -n ns-core-2 ls --filter ms-tap

NAME  	NAMESPACE	REVISION	UPDATED                                	STATUS  	CHART        	APP VERSION
ms-tap	ns-core-2	16      	2021-07-09 09:00:36.324702754 +0000 UTC	deployed	laravel-0.5.6

mihai@devBox  flux -n ns-core-2 reconcile helmrelease ms-tap
► annotating HelmRelease ms-tap in ns-core-2 namespace
✔ HelmRelease annotated
◎ waiting for HelmRelease reconciliation
✔ HelmRelease reconciliation completed
✔ applied revision 0.5.6

mihai@devBox  helm -n ns-core-2 ls --filter ms-tap
NAME  	NAMESPACE	REVISION	UPDATED                                	STATUS  	CHART        	APP VERSION
ms-tap	ns-core-2	18      	2021-07-09 09:02:54.144744795 +0000 UTC	deployed	laravel-0.5.6

As you can see after the reconcile the revision is bumped by 2, from 16 to 18 (not always by 2... possibly it synced with the interval reconcile loop) and hooks were triggered.

Please let me know if I'm missing something, and what data do you need from me (if any).

Disclaimer: I will be on vacation for the next 2 weeks so I'll probably be slow to respond, sorry.

Thanks and congrats for the great tools you're building!

@hiddeco
Copy link
Member

hiddeco commented Jul 9, 2021

Thanks for submitting the issue and providing some more details to Stefan.

Based on additional information I have gathered from/with Stefan, it seems that the generation of the HelmRelease for some reason is bumped every time, which makes the controller assume a short route to upgrade because there is an assumption this should only happen for spec changes.

After we discovered this, we had a couple of options left, but were able to trace it down to your internal usage of flux reconcile which due to making use of Update instead of Patch to change the annotation values, seems to accidentally bump the generation.

We will be working on a patch for fluxcd/flux2 to solve this there.

@hiddeco
Copy link
Member

hiddeco commented Oct 22, 2021

This has been solved in a flux release months ago :-)

@hiddeco hiddeco closed this as completed Oct 22, 2021
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