-
Notifications
You must be signed in to change notification settings - Fork 163
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
Helm release unable to rollback manual changes after enabling drift detection #742
Comments
I am trying to reproduce this @sojinss4u .
Then edited the
Is there any steps I might be missing? |
Steps are correct. Basically this error comes when manually set limit on the cluster is > last release limit. |
@sojinss4u I am unable to replicate your error then. The helm controller reverts the changes for me. What memory request/limits do you see when you run |
I've ran into a similar issue, it seems that this happens when not using the replacement strategy: With upgrade.force = true With upgrade.force = false I've ran into another caveat with upgrade.force=true, i'll open a separate issue |
FYI, I only have metadata being logged on the API servers and not the full payload (that would cause an immense toll to logs on our clusters) but i can see that the patch command is being issued and returns a 200, but the spec of my object isn't really changed, so most likely the issue is with the patch payload itself. If i find any further info i'll drop it here later :) |
I've build a custom version of the latest helm-controller, with a custom version of helm 3.12.3 which outputs the patches it's going to send to the API server, here's the relevant bits: helm-controller detects drift on .spec.pod.resources.requests.cpu, triggers an upgrade helm upgrade sends this patch to the API server:
|
Just to add, from my testing this seems to be affecting the patching of CRDs but not of native resources like Deployment. Seems like a helm bug to me.. |
Upon closer analysis, seems like this is unrelated to the original issue, I've opened #805 to address this problem specifically |
Hello,
I am currently using flux version 'v0.41.2' (Helm Controller Version: v0.31.2). I have enabled '--feature-gates=DetectDrift=true' in Helm controller so that the manual changes in helm deployments can be automatically rolled back. After enabling this feature I have seen the following error in our Kyverno helm release.
In the HelmChart the value for kyverno deployment memory limit is 200Mi & request is 100Mi. I have manually edited the deployment inside the cluster & increased request to 500Mi & limit to 1000Mi. After the changes helm is unable to automatically revert the changes & showing above error. I believe this error is coming as the actual memory request value present in the cluster (500Mi) > the memory limit present in the HelmChart. If I make the request less than 200Mi in the cluster, the error disappears & rollback automatically happen. However this is a problem as now these manual changes can't be reverted by Helm drift detection. Is there any solution to this problem?
cc: @hiddeco
The text was updated successfully, but these errors were encountered: