-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Running fluxctl sync
does not apply manifests
#2818
Comments
Related to #2487 |
Could also be related to #3450 I'm sorry that this has gone unresponded for a while, I hope you have found your way to Flux v2 where this issue should be mitigated already. We've added an entry to the Flux v1 FAQ that addresses performance problems related to image scanning, as a subheading under "Why should I upgrade": https://fluxcd.io/legacy/flux/faq/#flux-v1-runtime-behavior-doesnt-scale-well Flux v1 is formally superseded since the GitOps Toolkit APIs have been declared stable: https://fluxcd.io/docs/migration/timetable/ The repo will remain in maintenance for some time, but no new features can be accepted. Bugs can be addressed if they are critical and there is a PR to resolve it, but soon only CVEs can be addressed in Flux v1, and new users are all recommended to use Flux v2 for some time now. Thanks for using Flux! I am closing this issue, but please don't take this as a sign of no support. Flux v1 remains in supported maintenance for now. I can only work on issues that are actively affecting users and I am purely trying to get the number of issues in the queue down to a more manageable number. If you are still suffering then we can reopen, or address this in a new issue report. |
To clarify in plain language what I think causes this, since it feels unresolved leaving the discussion like this Flux's image automation (v1) scans the cluster for images that it can automate, then it scans their image repos for any tags that might be candidate for updating. When you have not enabled semver automation, the only information that Flux has to go by in order to determine which image is the correct "latest" image is the build timestamp. In order to retrieve the build time, Flux must download the metadata of the image, which Docker Hub and other registries count as a "pull" for the purposes of rate limiting, since even though it is in the header, it is in the image layer, and they must access it from storage. (Ref: cold storage vs hot, cold storage is cheaper as long as you never ever need access to that data.) Flux v1 cannot properly assess which image should be synced until it has all of the metadata from every possible candidate image. So when Flux first starts, and finds image automation enabled in some places, syncs don't happen at all until the image scanning process is completed, to avoid the risk of reverting some newer image (perhaps manually applied to the cluster while Flux was offline) back to an older one. And this whole process is rate limited, so that will take a bit longer than we'd like (in the pathological case of a cluster with many images, from many different sources, with many different candidate tags, it can be that this problem is for all intents and purposes utterly intractable, and thus might never finish.) Flux v2 does not pull image metadata anymore, instead requiring automation to use "Sortable Image Tags" or tags with enough information in the tag string itself to sort images without any metadata, simply by filtering (usually with some form of regex) and then ordering the data returned in the tag index by some sortable string part. This is heaps more efficient. I apologize for the length of time that has elapsed, but hope you've resolved this issue one way or another, and I encourage you to check out Flux v2. Don't hesitate to contact us if you need support in the way of migration or otherwise. Thanks for using Flux. |
Describe the bug
When doing a manual sync, with
fluxctl sync
flux does not apply the current manifests. Nothing gets applied until the nextsync-interval
time.We expect flux sync to apply the manifests immediately and not wait for sync-interval to occur.
This is important in situations when something gets deleted by accident and we need to re-apply the current state.
To Reproduce
We run a standard kustomized flux deployment with the following container args:
Expected behavior
When doing a
fluxctl sync
we expect to see somemethod=Sync
in the logs, i.e flux actually applying the manifests. But that doesn't happen until the next sync-interval.Logs
When running
fluxctl sync
:Then a few minutes later at 09:23:20, the real sync kicks in:
Additional context
The text was updated successfully, but these errors were encountered: