Repository navigation
Replies: 2 comments 1 reply
|
Ref:
It seems a general purpose server-side apply problem? |
|
This is the SSA limitation from kubernetes/kubernetes#130292, and helm-controller has a flag that resolves it. Why the dry-run fails. For server-side apply, Recovery. Run helm-controller with spec:
kustomize:
patches:
- target:
kind: Deployment
name: helm-controller
patch: |
- op: add
path: /spec/template/spec/containers/0/args/-
value: --override-manager=kubectl-editAdd To unblock the current release right away, revert the port with |
Uh oh!
There was an error while loading. Please reload this page.
Summary
I'm trying to understand the expected behavior of HelmRelease drift detection when the server-side dry-run itself fails because of the drift.
I have a
HelmReleasewith drift detection enabled and server-side apply enabled for upgrades:Reproduction
To test drift detection, I manually edit a Service managed by the HelmRelease:
For example, I change one Service port from:
to:
The edited Service itself remains valid.
I would expect drift detection to restore the Service to the state stored in the Helm release.
Instead, the HelmRelease gets stuck with:
The duplicate port names do not exist in the manually edited Service. They seem to appear as part of the server-side dry-run used to determine the cluster state.
As long as the Service stays in this drifted state, Flux does not recover it automatically.
Controller logs
The helm-controller reports that the HelmChart is in sync, but reconciliation then fails while determining the cluster state:
Questions
Is this expected behavior?
driftDetection.mode: enabledbe able to recover when the drift causes the SSA dry-run itself to become invalid?Service.spec.ports?I'm not necessarily suggesting that Flux should always perform an automatic delete/recreate or force replace, as this could be destructive for some resource types.
However, changing a single port on a Helm-managed Service can currently put the HelmRelease into a state where drift detection can detect that something is wrong, but cannot restore the desired state automatically.
All reactions