From 29273a1a55c825e8dafe55ae57eaa354ff8cadfb Mon Sep 17 00:00:00 2001 From: Finn Date: Thu, 8 Aug 2024 15:04:43 -0700 Subject: [PATCH] Remove monitoring rules from kube-prometheus that don't apply to k3s --- .../kube-prometheus/kubernetes-monitoring-rules-patches.yaml | 4 ++++ k8s/operators/kube-prometheus/kustomization.yaml | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 k8s/operators/kube-prometheus/kubernetes-monitoring-rules-patches.yaml diff --git a/k8s/operators/kube-prometheus/kubernetes-monitoring-rules-patches.yaml b/k8s/operators/kube-prometheus/kubernetes-monitoring-rules-patches.yaml new file mode 100644 index 0000000..3ac7470 --- /dev/null +++ b/k8s/operators/kube-prometheus/kubernetes-monitoring-rules-patches.yaml @@ -0,0 +1,4 @@ +- op: remove + path: /spec/groups/8 # name: kubernetes-system-controller-manager which doesn't seem to exist on k3s +- op: remove + path: /spec/groups/7 # name: kkubernetes-system-scheduler which doesn't seem to exist on k3s diff --git a/k8s/operators/kube-prometheus/kustomization.yaml b/k8s/operators/kube-prometheus/kustomization.yaml index 166e907..6d55ad5 100644 --- a/k8s/operators/kube-prometheus/kustomization.yaml +++ b/k8s/operators/kube-prometheus/kustomization.yaml @@ -31,7 +31,10 @@ patches: target: kind: Deployment name: grafana - + - path: kubernetes-monitoring-rules-patches.yaml + target: + kind: PrometheusRule + name: kubernetes-monitoring-rules secretGenerator: - name: grafana-config namespace: monitoring