When VMAlert.spec.notifiers is configured via selector, the generated vmalert Deployment does not include the notifier TLS CA file argument (-notifier.tlsCAFile=... / corresponding CA file flag).
What steps did you take and what happened?
Configured VMAlert.spec.notifiers using selector together with TLS configuration:
notifiers:
- selector:
labelSelector:
matchLabels:
app.kubernetes.io/instance: vmalertmanager
namespaceSelector:
matchNames:
- namespace-alertmanager
tlsConfig:
ca:
configMap:
name: ca
key: ca.crt
Matching VMAlertmanager resources exist in the selected namespace.
After reconciliation, generated vmalert Deployment contain args:
-notifier.url=..., but does not contain any notifier TLS CA argument (e.g. -notifier.tlsCAFile=...).
Because of this, notifier discovery via selector does not work and vmalert cannot send alerts to Alertmanager endpoints that require custom CA trust.
What did you expect to happen?
###Operator should:
- correctly resolve notifier URLs using selector
- render -notifier.url=
- mount provided CA configMap
- add notifier TLS CA argument (e.g. -notifier.tlsCAFile=)
Is there anything else you would like to add?
The issue only reproduces when notifier is configured via selector.
When the notifier is configured with an explicit url, TLS configuration behaves differently and the generated vmalert Deployment does include the notifier TLS CA file argument (-notifier.tlsCAFile=...).
It looks like operator generates an empty notifier argument instead of failing reconciliation or reporting an error.
This makes it difficult to use VMAlert.spec.notifiers[].selector together with TLS-protected Alertmanager endpoints.
Please tell us about your environment.
|
Value |
How to Obtain |
| Kubernetes version |
v1.30.4 |
kubectl version |
| VM Operator version |
v0.60.0 |
kubectl -n beget-vm-operator get pods \
-ojsonpath='{range .items[*].spec.containers[*]}{.image}{"\n"}{end}' | \
sort -u
quay.io/brancz/kube-rbac-proxy:v0.21.0
victoriametrics/operator:v0.60.0
|
When
VMAlert.spec.notifiersis configured viaselector, the generatedvmalertDeployment does not include the notifier TLS CA file argument (-notifier.tlsCAFile=.../ corresponding CA file flag).What steps did you take and what happened?
Configured
VMAlert.spec.notifiersusingselectortogether with TLS configuration:Matching VMAlertmanager resources exist in the selected namespace.
After reconciliation, generated vmalert Deployment contain args:
-notifier.url=..., but does not contain any notifier TLS CA argument (e.g.-notifier.tlsCAFile=...).Because of this, notifier discovery via selector does not work and vmalert cannot send alerts to Alertmanager endpoints that require custom CA trust.
What did you expect to happen?
###Operator should:
Is there anything else you would like to add?
The issue only reproduces when notifier is configured via selector.
When the notifier is configured with an explicit url, TLS configuration behaves differently and the generated vmalert Deployment does include the notifier TLS CA file argument (-notifier.tlsCAFile=...).
It looks like operator generates an empty notifier argument instead of failing reconciliation or reporting an error.
This makes it difficult to use VMAlert.spec.notifiers[].selector together with TLS-protected Alertmanager endpoints.
Please tell us about your environment.
v1.30.4kubectl versionv0.60.0