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'm currently working with a colleague on migrating a few outstanding workloads from Flux 1 to Flux 2 and while it's so far going swimmingly we've hit quite an interesting issue causing constant drift and a back-and-forth change every Kustomization interval.
The issue is with a validating webhook (FWIW originally created by Flux 1) which looks like this (excluding a whole bunch of fields for brevity but including managed fields):
# Fail open until the validation webhook is ready. The webhook controller
# will update this to `Fail` and patch in the `caBundle` when the webhook
# endpoint is ready.
failurePolicy: Ignore
This all makes perfect sense - when initially deployed by Flux the policy is set to Ignore, once the controller is ready it updates the webhook to Fail and remains like that ever since. Except... it doesn't, because kustomize-controller is attempting to change it at every interval (and then it's subsequently changed back by the controller - you can see in the above snippet that the Update time in both entries in managedFields is identical). Having encountered fluxcd/flux2#2386 previously during another migration I thought that maybe this is something that can be solved via a manual patch of managed fields but subsequently realised that the failurePolicy field is already owned by the pilot-discovery entity.
I've only stumbled upon managed fields as part of the aforementioned issue so it's not something I'm particularly knowledgeable in ... Is my understanding of how this is meant to be correct at all? Shouldn't kustomize-controller be ignoring any changes made to failurePolicy because that field is managed by another entity?
Thanks!
The text was updated successfully, but these errors were encountered:
Hello,
I'm currently working with a colleague on migrating a few outstanding workloads from Flux 1 to Flux 2 and while it's so far going swimmingly we've hit quite an interesting issue causing constant drift and a back-and-forth change every Kustomization interval.
The issue is with a validating webhook (FWIW originally created by Flux 1) which looks like this (excluding a whole bunch of fields for brevity but including managed fields):
The webhook itself comes from Istio and includes a comment on this very field: https://github.com/istio/istio/blob/master/manifests/charts/istio-control/istio-discovery/templates/validatingwebhookconfiguration.yaml#L41-L44
This all makes perfect sense - when initially deployed by Flux the policy is set to
Ignore
, once the controller is ready it updates the webhook toFail
and remains like that ever since. Except... it doesn't, becausekustomize-controller
is attempting to change it at every interval (and then it's subsequently changed back by the controller - you can see in the above snippet that theUpdate
time in both entries inmanagedFields
is identical). Having encountered fluxcd/flux2#2386 previously during another migration I thought that maybe this is something that can be solved via a manual patch of managed fields but subsequently realised that thefailurePolicy
field is already owned by thepilot-discovery
entity.I've only stumbled upon managed fields as part of the aforementioned issue so it's not something I'm particularly knowledgeable in ... Is my understanding of how this is meant to be correct at all? Shouldn't
kustomize-controller
be ignoring any changes made tofailurePolicy
because that field is managed by another entity?Thanks!
The text was updated successfully, but these errors were encountered: