-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[kube-prometheus-stack] WIP: upgrade CRDs using helm #5175
base: main
Are you sure you want to change the base?
Conversation
4ca8953
to
b7ab816
Compare
@QuentinBisson @GMartinez-Sisti this is super WIP (but working) what did you think? It based on https://github.com/vmware-tanzu/helm-charts/tree/main/charts/velero/templates/upgrade-crds?rgh-link-date=2025-01-15T09%3A52%3A20Z |
Signed-off-by: Jan-Otto Kröpke <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]>
b7ab816
to
ba8f7e0
Compare
I'm all up for it! 🙌 -> #4507 |
- alertmanagerconfigs.monitoring.coreos.com | ||
- alertmanagers.monitoring.coreos.com | ||
- podmonitors.monitoring.coreos.com | ||
- probes.monitoring.coreos.com | ||
- prometheusagents.monitoring.coreos.com | ||
- prometheuses.monitoring.coreos.com | ||
- prometheusrules.monitoring.coreos.com | ||
- scrapeconfigs.monitoring.coreos.com | ||
- servicemonitors.monitoring.coreos.com | ||
- thanosrulers.monitoring.coreos.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible we should make this dynamic so we don't miss new CRDs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Signed-off-by: Jan-Otto Kröpke <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]>
Please take note that the CRDs needs to be pre-compressed, All CRDs in gzip format are approx. 300KB, while xz just using 80KB. The creation of the tar.xz is part of hack scripts, but how we protect us against suspicious tar files? |
Signed-off-by: Jan-Otto Kröpke <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]>
fc09795
to
dd5fbcb
Compare
Checksum? We can add a checksum file next to it, then run the same on ci and check the match. |
I give-up after an hour to setup an reproducible tar archive which can be generated on any os (e.g. mac and linux) For example, I can't find a tar option on mac where I can drop the mtime of the files. GNU tar adds some pax header while bsd tar does not do it. |
Yeah, it’s hard to find a way with native commands, I usually fix these issues by running the commands in a docker container. |
0b25bf6
to
d4e4126
Compare
Signed-off-by: Jan-Otto Kröpke <[email protected]>
05bb2ce
to
f481141
Compare
Signed-off-by: Jan-Otto Kröpke <[email protected]>
f481141
to
ec80534
Compare
What about check,
please offer a solution. While tar isn't the big issue, xz might be. Seems not possible to get the same archive from macos/linux using xz compression. Even with gnu tar on mac, the archive is different. gz is not an option, because the compression rate is really, really bad. Tests with zstd works fine, however busybox does not support zstd. Then, I tried docker. The ubuntu docker image does not have xz pre installed. starting with apt-get first feels terrible slow. busybox have xz embedded, but does not offer capabilities to strip the mtime. |
Sure, I can test this during the weekend. |
What this PR does / why we need it
Since helm does not support upgrading CRDs, it's an manual task for our end-users. However the velero chart https://github.com/vmware-tanzu/helm-charts/tree/main/charts/velero/templates/upgrade-crds implement a upgrade job using helm hooks that works for at least 1 year.
Which issue this PR fixes
(optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged)Special notes for your reviewer
I would leave it disabled for now in order to have the ability to test the job on real upgrades.
Checklist
[prometheus-couchdb-exporter]
)