-
Notifications
You must be signed in to change notification settings - Fork 614
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
flux reconcile hr: double upgrade/redeployment #1882
Comments
This happens because the source is annotated first(which triggers the first upgrade as the helm-controller watches it) and then the helm release is annotated again(second upgrade). |
If the Feature/Bug? Dunno. Just unexpected. Seems
|
Yes all Flux reconcilers are triggered by source changes that's by design. |
I get that, to a point.
What you say indicates |
The interval is there because Kubernetes events are not guaranteed, due to API server congestion and other network related issues is possible that the controller doesn't receive the update event. No matter if the event is received or not, Flux uses the interval to reconcile the cluster to the latest revision. Another function of interval is that Flux can correct drift in-cluster, such as a manual helm upgrade that is rollback at the specified interval. |
Shouldn't second reconciliation (interval triggered) of HelmRelease not update anything since the one started by source update already made all necessary changes? And might there by some issue with how helm-controller treats simultaneously running reconciliations, as in issues linked above? |
A resource is never worked on by two processes at the same time as the queue won't allow this. What you are observing in that issue is likely a race condition that occurs between an apply and a condition related update. These errors will no longer happen in an upcoming (to be announced) release, as we will be introducing a more intelligent patcher in the near future: https://pkg.go.dev/github.com/fluxcd/pkg/runtime@v0.13.0-rc.5/patch |
Any updates on this one? |
Fixed in fluxcd/helm-controller#738 |
Describe the bug
flux reconcile hr --with-source
causes 2 helm upgrades.Proof is in the
helm history
.For simple deployments, this may be just an annoyance because the 2nd upgrade will be a no-op.
However, if you have some
post-upgrade
hooks configured, they will be executed twice, once for every upgrade.This may or may not be an issue but it is certainly undesired.
Steps to reproduce
Expected behavior
single helm upgrade, of course
Screenshots and recordings
No response
OS / Distro
Windows 10 + Alpine Linux in K8s
Flux version
0.17.2
Flux check
$ flux check
► checking prerequisites
✔ kubectl 1.20.2 >=1.18.0-0
✔ Kubernetes 1.21.5 >=1.16.0-0
► checking controllers
✔ helm-controller: deployment ready
► ghcr.io/fluxcd/helm-controller:v0.11.2
✔ kustomize-controller: deployment ready
► ghcr.io/fluxcd/kustomize-controller:v0.14.1
✔ notification-controller: deployment ready
► ghcr.io/fluxcd/notification-controller:v0.16.0
✔ source-controller: deployment ready
► ghcr.io/fluxcd/source-controller:v0.15.4
✔ all checks passed
Git provider
No response
Container Registry provider
No response
Additional context
Workaround:
Code of Conduct
The text was updated successfully, but these errors were encountered: