-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix(helm): Fix the problem of determining whether the helm chart is upgraded or not #5059
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
Conversation
I hope to finally solve this problem, so I need to rigorously test |
8ec4959
to
04f1630
Compare
Signed-off-by: cndoit18 <[email protected]>
Unfortunately still reproducible |
I may need more information so I can troubleshoot, can you provide a bug demo? |
I'm away for couple of days, when back I'll create a minimal repro case that I can share. |
thank you very much |
this operator-sdk helm setup reproduces the issue. |
I verified this in my local area and found that I could not reproduce the problem |
|
May you use the script above to test it? @wscheele |
hi @cndoit18 , thanks, i think there was something fishy in my test setup indeed. |
the full chart also worked after clean deploy, but initially it appeared to continue "upgrading" after i upgraded the controller. |
The parameters we pass in are the value and the chart, so when there is a change in these two parameters it can be assumed that an upgrade is needed. WDYT Thank you |
@cndoit18 The problem is that the code that actually executes the templates to build the release manifest can be configured in other ways. As I mentioned in #5042 (comment), there are other "inputs" such as the version of helm, the version of sprig, and any post-renderer that's being used. There are probably others I'm not aware of. IMO, I think we should revert #4937 and any of its follow-ons. At the end of the day, it seems like there isn't a foolproof way to check whether an upgrade is required without just comparing the final release manifest. The limitation is that it is not possible to use any non-deterministic/random templating functions. This has been a well-known and well-understood limitation (see #1069, #1106, #1291, #1862, ) since the helm-operator was introduced, so I think a better solution would be to just visibly document this limitation in the operator-sdk docs. WDYT? |
Thank you. We can check if it contains randAlphaNum and if so will issue a warning event and also reject any update operation? Or can we continue along the current lines and keep updating until the edge cases are all resolved? operator-sdk/internal/helm/release/manager.go Line 200 in d7b4ad1
In the case stated by #5042 (comment), other information is already lost during installation.(So they may not be too important) I still prefer to compare charts and values directly. WDYT? |
should the operator even attempt to negate the effect of non-deterministic input like randAlphaNum? |
Signed-off-by: cndoit18 [email protected]
fixes: #5056
fixes: #5072
Description of the change:
append #5042
Motivation for the change:
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments
(seechangelog/fragments/00-template.yaml
)website/content/en/docs