feat: introduce default version flags for Prometheus, Alertmanager and Thanos - #8651
Open
davidquan1 wants to merge 7 commits into
Open
feat: introduce default version flags for Prometheus, Alertmanager and Thanos#8651davidquan1 wants to merge 7 commits into
davidquan1 wants to merge 7 commits into
Conversation
davidquan1
force-pushed
the
issue8641-add-default-version
branch
2 times, most recently
from
June 25, 2026 05:51
9e0c894 to
578989b
Compare
…n, and --thanos-default-version flags to the operator. These flags allow user to define the default version used for configuration rendering and image building when .spec.version is omitted in Custom Resources. This ensures functional consistency when using custom base images (e.g., security-hardened LTS images via digests) that differ from the operator's hardcoded defaults. Signed-off-by: David Quan <david.quan@broadcom.com>
davidquan1
force-pushed
the
issue8641-add-default-version
branch
from
June 25, 2026 06:02
578989b to
5bbf627
Compare
Contributor
Author
|
Hi @simonpasquier, Could you please help review this PR? It implements the requested flags for setting default component versions (Prometheus, Alertmanager, and Thanos) in the operator. Thanks! |
Signed-off-by: David Quan <david.quan@broadcom.com>
Signed-off-by: David Quan <david.quan@broadcom.com>
davidquan1
force-pushed
the
issue8641-add-default-version
branch
from
July 1, 2026 08:29
7b08880 to
f577e7e
Compare
…mage is used Signed-off-by: David Quan <david.quan@broadcom.com>
… empty config safely Signed-off-by: David Quan <david.quan@broadcom.com>
Signed-off-by: David Quan <david.quan@broadcom.com>
davidquan1
force-pushed
the
issue8641-add-default-version
branch
2 times, most recently
from
July 1, 2026 11:07
f53cfb5 to
5ec0491
Compare
Signed-off-by: David Quan <david.quan@broadcom.com>
davidquan1
force-pushed
the
issue8641-add-default-version
branch
from
July 1, 2026 11:15
5ec0491 to
93dbb16
Compare
Contributor
Author
|
Hi @simonpasquier, All comments have been addressed. Here is a summary of the changes:
The PR is now ready for another look. Could you please review it again when you have a moment? Thank you! |
Contributor
Author
|
Hi @simonpasquier, |
Contributor
Author
|
Hi @simonpasquier, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Currently, the Prometheus Operator defaults to the latest stable version of operands (e.g., Prometheus v3.12.0) if
.spec.versionis omitted in the Custom Resource. This creates a "silent trap" for platform maintainers who use the-default-base-imageflags to globally enforce specific, security-hardened LTS images (especially via digests).In such cases, the Operator continues to render configuration based on its hardcoded bleeding-edge defaults. This leads to functional disconnects, such as generating invalid YAML schema (e.g., the
storage.tsdb.retentionfield introduced in v3.11.0) for older LTS versions (like v3.5.4), causing operand pods to crash.This PR introduces three new command-line flags to bridge this gap:
-prometheus-default-version-alertmanager-default-version-thanos-default-versionThese flags allow maintainers to explicitly sync the "assumed default version" with their "overridden default image," ensuring functional consistency by default when .spec.version is not defined in the Custom Resources.
Closes: #8641
Type of change
What type of changes does your code introduce to the Prometheus operator? Put an
xin the box that apply.CHANGE(fix or feature that would cause existing functionality to not work as expected)FEATURE(non-breaking change which adds functionality)BUGFIX(non-breaking change which fixes an issue)ENHANCEMENT(non-breaking change which improves existing functionality)NONE(if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)Verification
Changelog entry