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
fix: add --cluster.label to alertmanager #5945
fix: add --cluster.label to alertmanager #5945
Conversation
small nit: this is more a bug fix for me since it can avoid an Alertmanager pod from joining another cluster than expected. |
i've found a few references in the Alertmanager issues: |
9f65dbd
to
a2b43ed
Compare
@simonpasquier addressed comments |
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.
just a few comments to clarify what we want to prevent.
If multiple Alertmanager clusters are deployed on the same cluster, it can happen that because pod IP addresses are recycled, an Alertmanager instance from cluster B connects with cluster A. --cluster.label flag was introduced in alertmanager v0.26, this helps to block any traffic that is not meant for the cluster. The value is hardcoded and the value is guaranteed to be unique in a given cluster but if there's a use case, we can consider a new field in the CRD. This commit sets default --cluster.label flag as namespace/name when Alertmanager version used is >= v0.26 Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
a2b43ed
to
f143e68
Compare
@simonpasquier updated |
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.
Thanks!
If multiple Alertmanager clusters are deployed on the same cluster, it can happen
that because pod IP addresses are recycled, an Alertmanager instance from cluster B
connects with cluster A.
--cluster.label
flag was introduced in alertmanagerv0.26
, this helps to blockany traffic that is not meant for the cluster.
The value is hardcoded and the value is guaranteed to be unique in a given cluster but
if there's a use case, we can consider a new field in the CRD.
This commit sets default
--cluster.label
flag as namespace/namewhen Alertmanager version used is >= v0.26
Description
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue.
Type of change
What type of changes does your code introduce to the Prometheus operator? Put an
x
in 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.)Changelog entry
Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.