From 617d80f24a632c2c067301031c6301fd6661f5c6 Mon Sep 17 00:00:00 2001 From: Federico Paolinelli Date: Mon, 27 Nov 2023 17:18:12 +0100 Subject: [PATCH 1/2] Charts: disable service monitors by default We don't know if the dest cluster has the prometheus operator deployed, so it's not safe to assume so by default. Also, removing comments related to metallb alarms. Signed-off-by: Federico Paolinelli --- charts/frr-k8s/README.md | 2 +- charts/frr-k8s/values.yaml | 31 +------------------------------ 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/charts/frr-k8s/README.md b/charts/frr-k8s/README.md index 869b4235..5844c47e 100644 --- a/charts/frr-k8s/README.md +++ b/charts/frr-k8s/README.md @@ -81,7 +81,7 @@ Kubernetes: `>= 1.19.0-0` | prometheus.serviceAccount | string | `""` | | | prometheus.serviceMonitor.additionalLabels | object | `{}` | | | prometheus.serviceMonitor.annotations | object | `{}` | | -| prometheus.serviceMonitor.enabled | bool | `true` | | +| prometheus.serviceMonitor.enabled | bool | `false` | | | prometheus.serviceMonitor.interval | string | `nil` | | | prometheus.serviceMonitor.jobLabel | string | `"app.kubernetes.io/name"` | | | prometheus.serviceMonitor.metricRelabelings | list | `[]` | | diff --git a/charts/frr-k8s/values.yaml b/charts/frr-k8s/values.yaml index 0c2472d1..dc1095e7 100644 --- a/charts/frr-k8s/values.yaml +++ b/charts/frr-k8s/values.yaml @@ -55,7 +55,7 @@ prometheus: # Prometheus Operator ServiceMonitors. serviceMonitor: # enable support for Prometheus Operator - enabled: true + enabled: false additionalLabels: {} # optional additional annotations for the controller serviceMonitor @@ -86,35 +86,6 @@ prometheus: # replacement: $1 # action: replace -# # Prometheus Operator alertmanager alerts -# prometheusRule: -# # enable alertmanager alerts -# enabled: false -# -# # optional additionnal labels for prometheusRules -# additionalLabels: {} -# -# # optional annotations for prometheusRules -# annotations: {} -# -# -# addressPoolUsage: -# enabled: true -# thresholds: -# - percent: 75 -# labels: -# severity: warning -# - percent: 85 -# labels: -# severity: warning -# - percent: 95 -# labels: -# severity: alert -# -# -# extraAlerts: [] - - # controller contains configuration specific to the FRRK8s controller # daemonset. frrk8s: From d2ba9c1080829fbb1b3cb02d701324d6b8c29e2f Mon Sep 17 00:00:00 2001 From: Federico Paolinelli Date: Mon, 27 Nov 2023 17:29:08 +0100 Subject: [PATCH 2/2] Makefile: enable prometheus.service monitor when deploying helm The makefile rule deploys the prometheus stack, so it makes sense to enable the servicemonitor. Signed-off-by: Federico Paolinelli --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 836cc9c6..0bec5816 100644 --- a/Makefile +++ b/Makefile @@ -167,7 +167,7 @@ deploy-helm: helm deploy-cluster deploy-prometheus $(KUBECTL) create ns ${NAMESPACE} || true $(KUBECTL) label ns ${NAMESPACE} pod-security.kubernetes.io/enforce=privileged $(HELM) install frrk8s charts/frr-k8s/ --set frrk8s.image.tag=${IMG_TAG} --set frrk8s.logLevel=debug --set prometheus.rbacPrometheus=true \ - --set prometheus.serviceAccount=prometheus-k8s --set prometheus.namespace=monitoring --namespace ${NAMESPACE} + --set prometheus.serviceAccount=prometheus-k8s --set prometheus.namespace=monitoring --set prometheus.serviceMonitor.enabled=true --namespace ${NAMESPACE} sleep 2s # wait for daemonset to be created $(KUBECTL) -n frr-k8s-system wait --for=condition=Ready --all pods --timeout 300s