* *: add v1beta1 for AlertmanagerConfig CRD
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* *: implement conversion webhook for AlertmanagerConfig
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* *: add jsonnet support for CRD conversion webhook
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* test: configure conversion webhook for AlertmanagerConfig
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* test/e2e: add test for v1alpha1<->v1beta1 conversion
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Documentation: update webhook documentation
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* pkg/apis/monitoring/v1beta1: remove Regex field from Matcher type
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* *: rename muteTimeIntervals field to timeIntervals (v1beta1)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* *: restore short name for AlertmanagerConfig
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* pkg/admission: add unit test for conversion webhook
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* pkg/apis/monitoring/v1beta1: replace v1.SecretKeySelector by SecretKeySelector
v1.SecretKeySelector has an `Optional` field which doesn't make sense
in the context of the AlertmanagerConfig CRD. Not depending on an
external type also means that we can enforce that key and name values
are not empty.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* *: regenerate
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* *: make AlertmanagerConfig v1beta1 an opt-in choice
Enabling by default AlertmanagerConfig v1beta1 by default means that
users would have to configure the conversion webhook and it must be
performed in advance or at the same time users upgrade to the latest
operator version. To offer a smoother transition, we offer
AlertmanagerConfig v1beta1 as an opt-in feature: it's neither included
in the bundle.yaml file nor in the example/prometheus-operator-crd/
manifests.
People that want to enable v1beta1 should use the
example/prometheus-operator-crd-full manifests. For jsonnet users, the
Prometheus operator jsonnet library has a new
`enableAlertmanagerConfigV1beta1` configuration option that can be set
to `true`.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* *: add Telegram support in v1beta1
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* *: synchronize with latest main changes
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Documentation/user-guides/webhook.md: clarify mutation webhook
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* example: regenerate
Signed-off-by: Simon Pasquier <spasquie@redhat.com>