Repository navigation
Add follow-up silence CRD implementation proposal - #7798
danielmellado wants to merge 1 commit into
Conversation
a7ba771 to
a25b4b8
Compare
|
Lets add @mcbenjemaa as co-author signature should be in #5485 |
a25b4b8 to
bdbd146
Compare
This commit implements the first implementation of the Silence CRD proposed in [1]. It follows existing prometheus-operator patternsfrom other CRDs and proposes the new api to v1alpha1. [1] prometheus-operator#7798 Signed-off-by: Daniel Mellado <[email protected]> Co-authored-by: Mohamed Chiheb Ben Jemaa <[email protected]>
This commit implements the first implementation of the Silence CRD proposed in [1]. It follows existing prometheus-operator patternsfrom other CRDs and proposes the new api to v1alpha1. [1] prometheus-operator#7798 Signed-off-by: Daniel Mellado <[email protected]> Co-authored-by: Mohamed Chiheb Ben Jemaa <[email protected]>
simonpasquier
left a comment
There was a problem hiding this comment.
A couple more questions on top of my head:
- How does the operator know when a silences should be created, updated or deleted? How will it match a silence resource to the silences retrieved from the API?
- How do we ensure that a deleted Silence resource is effectively deleted from the Alertmanager API? Finalizers maybe?
- When Alertmanager runs in cluster, should the operator ensure that the silence exists on all instances? E.g. what happens if the replication between Alertmanagers is broken/degraded?
- We would need more details on the communication between the operator and Alertmanager API. Especially how do we provide API credentials to the operator? What are the supported authentication mechanisms?
- How does it integrate with the namespace-based tenancy model? E.g. if user creates a silence in namespace
foo, should the operator inject anamespace=foomatcher into the silence definition?
bdbd146 to
b1b1a7e
Compare
|
I've also included some of the feedback and comments in #7806. I'll hold into generating the CRD and the API itself until we agree on a format, tho :D |
b1b1a7e to
e2be541
Compare
|
|
||
| ## Non-Goals | ||
|
|
||
| * Automatic cleanup of expired Silence CRs (users manage lifecycle) |
There was a problem hiding this comment.
It triggers another point. Alertmanager will delete expired silences after some retention period (default: 120h). The option is available at .spec.retention. It's something that the controller might use to know if the silence has reached the retention limit.
|
|
||
| * Automatic cleanup of expired Silence CRs (users manage lifecycle) | ||
| * Cross-cluster silence management (out of scope) | ||
| * Advanced templating features (deferred to future iterations) |
There was a problem hiding this comment.
Not sure about this one. What does it cover exactly?
There was a problem hiding this comment.
I cherry picked this from the original but I have elaborated this a bit more, I'll upload a new version shortly ;)
|
This is looking great! Posting again 2 questions from my initial review.
It kinda relates to #5836 and #7004. Right now the operator doesn't support Prometheus/Alertmanager configured with authentication (basic auth or token). We need also to support a setup where the Alertmanager API is exposed via a reverse proxy (kube-rbac-proxy for instance).
This would need to be documented too. |
e2be541 to
5b3026c
Compare
We can continue the discussion in the API PR in parallel since it's easier to comment against the actual code. |
let me regenerate it then XD |
5b3026c to
43c9fc9
Compare
43c9fc9 to
a738384
Compare
This commit implements the first implementation of the Silence CRD proposed in [1]. It follows existing prometheus-operator patternsfrom other CRDs and proposes the new api to v1alpha1. [1] prometheus-operator#7798 Signed-off-by: Daniel Mellado <[email protected]> Co-authored-by: Mohamed Chiheb Ben Jemaa <[email protected]> Signed-off-by: Daniel Mellado <[email protected]>
This commit implements the first implementation of the Silence CRD proposed in [1]. It follows existing prometheus-operator patternsfrom other CRDs and proposes the new api to v1alpha1. [1] prometheus-operator#7798 Signed-off-by: Daniel Mellado <[email protected]> Co-authored-by: Mohamed Chiheb Ben Jemaa <[email protected]>
This commit implements the first implementation of the Silence CRD proposed in [1]. It follows existing prometheus-operator patternsfrom other CRDs and proposes the new api to v1alpha1. [1] prometheus-operator#7798 Signed-off-by: Daniel Mellado <[email protected]> Co-authored-by: Mohamed Chiheb Ben Jemaa <[email protected]> Signed-off-by: Daniel Mellado <[email protected]>
This commit implements the first implementation of the Silence CRD proposed in [1]. It follows existing prometheus-operator patternsfrom other CRDs and proposes the new api to v1alpha1. [1] prometheus-operator#7798 Signed-off-by: Daniel Mellado <[email protected]> Co-authored-by: Mohamed Chiheb Ben Jemaa <[email protected]> Signed-off-by: Daniel Mellado <[email protected]>
| specification, reusing existing authentication fields where possible to maintain | ||
| consistency with Prometheus authentication patterns. | ||
|
|
||
| ### Authentication and Reverse Proxy Support |
There was a problem hiding this comment.
I'm still a bit unclear on how we should inject credentials into the Alertmanager CR. In particular we want to avoid duplication with related efforts such as #5836.
There was a problem hiding this comment.
Should we just defer al this configurations to #5836 ? I modified how is this explained to directly do that and align.
69705c3 to
9b2c81e
Compare
This commit adds a a new follow-up proposal to cover implementation of silences CRD. Signed-off-by: Daniel Mellado <[email protected]> Co-authored-by: Mohamed Chiheb Ben Jemaa <[email protected]> Signed-off-by: Daniel Mellado <[email protected]>
9b2c81e to
717a983
Compare
…ation Expand the expired-silence section with: - The two-phase Alertmanager lifecycle: endsAt passes → expired state (still accessible); endsAt + spec.retention passes (default 120h) → purged (404). Addresses simonpasquier's comment from PR prometheus-operator#7798 about spec.retention and its role in silence lifecycle management. - How to re-activate an expired Silence CR: update spec.endsAt or spec.duration to a future time; the next reconcile resumes normally. Addresses the re-activation question raised on the original proposal. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
Proposes a Silence custom resource for prometheus-operator, so that Alertmanager silences can be managed declaratively through the Kubernetes API rather than only through the Alertmanager UI or REST API. Supersedes the proposal in prometheus-operator#7798, and builds on the original in prometheus-operator#5485 and the API review in prometheus-operator#7806. The status subresource follows the accepted configuration-resource convention, with the Alertmanager-assigned UUID as its one addition: the silence API is not declarative, so the handle it returns on creation is the only way to address a silence later, and it cannot be re-derived. Related: prometheus-operator#5452, prometheus-operator#2398, prometheus-operator#5836 Co-authored-by: Mohamed Chiheb Ben Jemaa <[email protected]> Co-authored-by: Daniel Mellado <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]> Signed-off-by: Nigel Smith <[email protected]>
Proposes a Silence custom resource for prometheus-operator, so that Alertmanager silences can be managed declaratively through the Kubernetes API rather than only through the Alertmanager UI or REST API. Supersedes the proposal in prometheus-operator#7798, and builds on the original in prometheus-operator#5485 and the API review in prometheus-operator#7806. The status subresource follows the accepted configuration-resource convention, with the Alertmanager-assigned UUID as its one addition: the silence API is not declarative, so the handle it returns on creation is the only way to address a silence later, and it cannot be re-derived. Adds amtool and the two author handles to the spell-check dictionary, following the existing convention for contributor names. Related: prometheus-operator#5452, prometheus-operator#2398, prometheus-operator#5836 Co-authored-by: Mohamed Chiheb Ben Jemaa <[email protected]> Co-authored-by: Daniel Mellado <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]> Signed-off-by: Nigel Smith <[email protected]>
Proposes a Silence custom resource for prometheus-operator, so that Alertmanager silences can be managed declaratively through the Kubernetes API rather than only through the Alertmanager UI or REST API. Supersedes the proposal in prometheus-operator#7798, and builds on the original in prometheus-operator#5485 and the API review in prometheus-operator#7806. The status subresource follows the accepted configuration-resource convention, with the Alertmanager-assigned UUID as its one addition: the silence API is not declarative, so the handle it returns on creation is the only way to address a silence later, and it cannot be re-derived. Adds amtool and the two author handles to the spell-check dictionary, following the existing convention for contributor names. Related: prometheus-operator#5452, prometheus-operator#2398, prometheus-operator#5836 Co-authored-by: Mohamed Chiheb Ben Jemaa <[email protected]> Co-authored-by: Daniel Mellado <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]> Signed-off-by: Nigel Smith <[email protected]>
|
This pull request is being closed because it had no activity in the last 180 days. This is not a signal from the maintainers that the PR has no value. We appreciate the time and effort that you put into this work. If you're willing to re-open it, the maintainers will do their best to review it. |
description
this pr adds a new, follow-up proposal for the silence crd implementation original one proposed by mcbenjemaa.
type of change
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.)