From 7bcdf2ff965b6e25ec4d4fe6713f7c3da0bfb801 Mon Sep 17 00:00:00 2001 From: Finn Date: Thu, 15 Aug 2024 12:11:37 -0700 Subject: [PATCH] raise some CPU limits to reduce CPU throttling --- k8s/keycloak/database.yaml | 1 + .../kube-prometheus/blackbox-exporter-patches.yaml | 9 +++++++++ .../kube-state-metrics-deployment-patches.yaml | 3 +++ k8s/operators/kube-prometheus/kustomization.yaml | 12 ++++++++++++ .../kube-prometheus/node-exporter-ds-patches.yaml | 3 +++ 5 files changed, 28 insertions(+) create mode 100644 k8s/operators/kube-prometheus/blackbox-exporter-patches.yaml create mode 100644 k8s/operators/kube-prometheus/kube-state-metrics-deployment-patches.yaml create mode 100644 k8s/operators/kube-prometheus/node-exporter-ds-patches.yaml diff --git a/k8s/keycloak/database.yaml b/k8s/keycloak/database.yaml index 8b51691..6eaf957 100644 --- a/k8s/keycloak/database.yaml +++ b/k8s/keycloak/database.yaml @@ -3,6 +3,7 @@ kind: postgresql metadata: name: keycloak-database spec: + spiloFSGroup: 103 # https://github.com/zalando/postgres-operator/issues/988 teamId: keycloak volume: size: 1Gi diff --git a/k8s/operators/kube-prometheus/blackbox-exporter-patches.yaml b/k8s/operators/kube-prometheus/blackbox-exporter-patches.yaml new file mode 100644 index 0000000..342a25c --- /dev/null +++ b/k8s/operators/kube-prometheus/blackbox-exporter-patches.yaml @@ -0,0 +1,9 @@ +- op: replace + path: /spec/template/spec/containers/0/resources/limits/cpu + value: 200m +- op: replace + path: /spec/template/spec/containers/1/resources/limits/cpu + value: 200m +- op: replace + path: /spec/template/spec/containers/2/resources/limits/cpu + value: 200m diff --git a/k8s/operators/kube-prometheus/kube-state-metrics-deployment-patches.yaml b/k8s/operators/kube-prometheus/kube-state-metrics-deployment-patches.yaml new file mode 100644 index 0000000..8530643 --- /dev/null +++ b/k8s/operators/kube-prometheus/kube-state-metrics-deployment-patches.yaml @@ -0,0 +1,3 @@ +- op: replace + path: /spec/template/spec/containers/2/resources/limits/cpu + value: 500m diff --git a/k8s/operators/kube-prometheus/kustomization.yaml b/k8s/operators/kube-prometheus/kustomization.yaml index b3eff7b..ec0d77a 100644 --- a/k8s/operators/kube-prometheus/kustomization.yaml +++ b/k8s/operators/kube-prometheus/kustomization.yaml @@ -47,6 +47,18 @@ patches: target: kind: Deployment name: prometheus-operator + - path: blackbox-exporter-patches.yaml + target: + kind: Deployment + name: blackbox-exporter + - path: node-exporter-ds-patches.yaml + target: + kind: DaemonSet + name: node-exporter + - path: kube-state-metrics-deployment-patches.yaml + target: + kind: Deployment + name: kube-state-metrics secretGenerator: - name: grafana-config namespace: monitoring diff --git a/k8s/operators/kube-prometheus/node-exporter-ds-patches.yaml b/k8s/operators/kube-prometheus/node-exporter-ds-patches.yaml new file mode 100644 index 0000000..29d7cf9 --- /dev/null +++ b/k8s/operators/kube-prometheus/node-exporter-ds-patches.yaml @@ -0,0 +1,3 @@ +- op: replace + path: /spec/template/spec/containers/1/resources/limits/cpu + value: 250m