prometheus-community / helm-charts

Prometheus community Helm charts
Apache License 2.0
5.05k stars 5.01k forks source link

[kube-prometheus-stack] Cannot use the alerts sidecar for alerts #4923

Open andreitigau opened 22 hours ago

andreitigau commented 22 hours ago

Describe the bug a clear and concise description of what the bug is.

The chart is missing the sidecar for alerts. Before I could provision alerts using some configuration like this:

  grafana:
     sidecar:
          alerts:
            enabled: true
            searchNamespace: ALL
            watchMethod: SLEEP
            resource: configmap

Now this seems not to be possible anymore.

What's your helm version?

v3.12.0

What's your kubectl version?

v1.27.2

Which chart?

kube-prometheus-stack

What's the chart version?

62.3.1

What happened?

No response

What you expected to happen?

No response

How to reproduce it?

No response

Enter the changed values of values.yaml?

No response

Enter the command that you execute and failing/misfunctioning.

There is no failing command. The chart used to contain an alerts sidecar and now, it doesn't.

Anything else we need to know?

No response

zeritti commented 21 hours ago

The chart is missing the sidecar for alerts.

The alerts sidecar is still supported by the grafana chart. The field is just not present in the KPS' default values.

helm install -n monitoring kps prometheus-community/kube-prometheus-stack \
  --set grafana.sidecar.alerts.enabled=true \
  --version=62.3.1

starts 4 containers in the grafana pod including the alerts sidecar:

$ kubectl get po -lapp.kubernetes.io/name=grafana
NAME                           READY   STATUS    RESTARTS   AGE
kps-grafana-5bdc59c478-gbzxj   4/4     Running   0          4m47s

$ kubectl get po kps-grafana-5bdc59c478-gbzxj \
  -o jsonpath='{.spec.containers[*].name}'
grafana-sc-alerts grafana-sc-dashboard grafana-sc-datasources grafana