-
Notifications
You must be signed in to change notification settings - Fork 21
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
[main] Fix CRDs being installed even when they already exist and don't need updating #114
base: main
Are you sure you want to change the base?
Conversation
bc8034c
to
fdeee11
Compare
Images built for PR #114:
|
Images built for PR #114:
|
So with this fix in place, if you create a cluster (using k3s/rke2) and then later install the chart you should see CRDs with 2 sets of timestamps. One for the cluster creation and one for the helm chart install time - the
Actually, while this seems like an improvement and the correct behavior...I'm not currently able to replicate this at all on 2.9.2 with I guess I'll try to setup 2.8 cluster and see if I can even replicate the original issue. Oh right - the creation date is what we're seeing and that doesn't change. So I should have compared status fields to check update at times. Currently rebuilding lab to test on 2.8 anyways but I'll remember that. |
Summary of Helm-Controller Situation:
Note that I've been testing with 1.28.14 which matches up with More info on CRD differences: https://gist.github.com/mallardduck/120b1d5d833126ae2cb8ff2df20c53c5 |
ed9b007
to
2077d30
Compare
Related Issue: rancher/rancher#46764 / SURE-8872
Per the title, this PR essentially just corrects instances where the CRDs related to this operator might already exist on the cluster it's being installed on. This fix simply ensures that CRDs are only installed when they actually should be installed.
Fixing the bug in this manner does introduce a minor regression related to CRDs being updated. Prior to this change if prometheus-federator wanted to ship an updated CRD it's fine because - in the past - all CRDs are always re-installed essentially at every start up.
While this process is still done at every startup, because we only act on installing missing CRDs it means CRDs we do control and need to update won't be updated currently.
Potential fixes for the update regression:
The description of the original issue isn't very accurate today as it used to be (i.e. using recent k3s/rke2 versions things work differently). However this PR seeks to address the root concern of the issues even if the conditions of modern distros are different.