You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just repeated the tests again with wait: false, using flux reconcile ks apps --with-source for both kustomize-controller versions (no actual changes to the manifests):
1.5.0:
2025-04-24T15:02:03.252Z info Kustomization/apps.flux-system - server-side apply for cluster definitions completed
2025-04-24T15:02:03.448Z info Kustomization/apps.flux-system - server-side apply completed
2025-04-24T15:02:03.484Z info Kustomization/apps.flux-system - Reconciliation finished in 968.028625ms, next run in 15m0s
1.5.1:
2025-04-24T15:03:38.173Z info Kustomization/apps.flux-system - server-side apply for cluster definitions completed
2025-04-24T15:04:14.223Z info Kustomization/apps.flux-system - server-side apply completed
2025-04-24T15:04:14.285Z info Kustomization/apps.flux-system - Reconciliation finished in 59.949239944s, next run in 15m0s
k -n flux-system get deployments.apps kustomize-controller -o yaml | grep image:
image: ghcr.io/fluxcd/kustomize-controller:rc-a5e315e9
2025-04-24T15:43:09.451Z info Kustomization/apps.flux-system - server-side apply for cluster definitions completed
2025-04-24T15:43:45.503Z info Kustomization/apps.flux-system - server-side apply completed
2025-04-24T15:43:45.581Z info Kustomization/apps.flux-system - Reconciliation finished in 1m0.312682902s, next run in 15m0s
Doesn't seem to help, maybe its another change made between 1.5.0 and 1.5.1
The StatusPoller is used for health check only, but if this regression happens with wait: false then my guess is that the issue is in Kubernetes packages v1.32.1 -> v1.32.2 or controller-runtime v0.20.1 -> v0.20.2
Yep, this happens when using wait: False.
The additional time seems to be added during the manager.ApplyAll and manager.WaitForSet calls, but I wasn't able to debug it much further ...
YAY! Happy I found this issue, as it was causing us lots of headaches. I think it would be best if this stayed open until the fix is officially released, as I am lucky that I just happened to look in the closed issues.
Reacted by Matheus Pimenta, Arcadie Condrat and Adam Jones
Activity
stefanprodan commentedon Apr 24, 2025
Is the 2m duration for 1.5.1 consistent, if you move the controller pod to a different node is the timing diffrent?
If you set the image back to 1.5.0 does the reconcile time comes back to normal?
Do you have
wait: truein the Flux Kustomization?aorith commentedon Apr 24, 2025
I just tested it using a kind k8s cluster. It doesn't make a difference whether
waitis true or false.To test it I created some dummy namespaces (250) each with a configmap using this script:
With kustomize-controller 1.5.1:
With With kustomize-controller 1.5.0 I don't even see the log about the time it took to reconcile, metrics tell me that it takes 1.5s
To switch between versions I used this patch:
stefanprodan commentedon Apr 24, 2025
It should make a huge difference, in 1.5.0 the health check watchers use the new Kubernetes Aggregated Discovery while in 1.5.1 we had to revert it.
Are the above tests with
wait: true?aorith commentedon Apr 24, 2025
I just repeated the tests again with
wait: false, usingflux reconcile ks apps --with-sourcefor both kustomize-controller versions (no actual changes to the manifests):1.5.0:
1.5.1:
stefanprodan commentedon Apr 24, 2025
Can you please run the test with
ghcr.io/fluxcd/kustomize-controller:rc-a5e315e9This RC is build from main where we've rolled back the controller-runtime change from 1.5.1, it uses the same RestMapper as in 1.5.0
aorith commentedon Apr 24, 2025
Doesn't seem to help, maybe its another change made between 1.5.0 and 1.5.1
stefanprodan commentedon Apr 24, 2025
The other changes were:
aorith commentedon Apr 24, 2025
Just ran some more tests building the controller on different commits, the first one going back from 1.5.1 that reconciles fast is 9ac2bba
Building against 8b6f4bc makes the reconciliation slow again...
stefanprodan commentedon Apr 24, 2025
The
StatusPolleris used for health check only, but if this regression happens withwait: falsethen my guess is that the issue is in Kubernetes packages v1.32.1 -> v1.32.2 or controller-runtime v0.20.1 -> v0.20.2aorith commentedon Apr 25, 2025
Yep, this happens when using
wait: False.The additional time seems to be added during the
manager.ApplyAllandmanager.WaitForSetcalls, but I wasn't able to debug it much further ...stefanprodan commentedon May 1, 2025
We've published an image containing the fix for this issue. Until the next Flux release you can use:
ghcr.io/fluxcd/kustomize-controller:rc-d1570458lodotek commentedon May 6, 2025
YAY! Happy I found this issue, as it was causing us lots of headaches. I think it would be best if this stayed open until the fix is officially released, as I am lucky that I just happened to look in the closed issues.