From ed483918312b93675b91f9f6271e2cb4d65b1268 Mon Sep 17 00:00:00 2001 From: lanmarti <lanmarti@users.noreply.github.com> Date: Tue, 27 Jul 2021 12:12:41 +0200 Subject: [PATCH] Add resource requests and limits to prometheus-adapter container --- .../components/prometheus-adapter.libsonnet | 1 + jsonnetfile.lock.json | 6 +++--- manifests/prometheus-adapter-deployment.yaml | 7 +++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/jsonnet/kube-prometheus/components/prometheus-adapter.libsonnet b/jsonnet/kube-prometheus/components/prometheus-adapter.libsonnet index 85daffef..86d0475a 100644 --- a/jsonnet/kube-prometheus/components/prometheus-adapter.libsonnet +++ b/jsonnet/kube-prometheus/components/prometheus-adapter.libsonnet @@ -206,6 +206,7 @@ function(params) { '--secure-port=6443', '--tls-cipher-suites=' + std.join(',', pa._config.tlsCipherSuites), ], + resources: pa._config.resources, ports: [{ containerPort: 6443 }], volumeMounts: [ { name: 'tmpfs', mountPath: '/tmp', readOnly: false }, diff --git a/jsonnetfile.lock.json b/jsonnetfile.lock.json index f824fafb..b6d6aead 100644 --- a/jsonnetfile.lock.json +++ b/jsonnetfile.lock.json @@ -38,7 +38,7 @@ "subdir": "grafana-builder" } }, - "version": "a20c679492aae363414dce23bc63da09cf8a7287", + "version": "4c6f9dabceb944ce894d79eeb516c98694f5759f", "sum": "GRf2GvwEU4jhXV+JOonXSZ4wdDv8mnHBPCQ6TUVd+g8=" }, { @@ -130,7 +130,7 @@ "subdir": "documentation/prometheus-mixin" } }, - "version": "79d354ad2e7c3d510a7811176d5ffcd1b29c8b77", + "version": "507d61fdeb4540c34102f41b7286895ecec19324", "sum": "G3mFWvwIrrhG6hlPz/hQdE6ZNSim88DlbSDJN7enkhY=", "name": "prometheus" }, @@ -141,7 +141,7 @@ "subdir": "mixin" } }, - "version": "0f5223beb7e9cb7e62f0227bf5649deb851e6112", + "version": "83419bc5e3c5f667410a04c1c9920e27c3779162", "sum": "cajthvLKDjYgYHCKQU2g/pTMRkxcbuJEvTnCyJOihl8=", "name": "thanos-mixin" }, diff --git a/manifests/prometheus-adapter-deployment.yaml b/manifests/prometheus-adapter-deployment.yaml index 475eaf53..fa51694d 100644 --- a/manifests/prometheus-adapter-deployment.yaml +++ b/manifests/prometheus-adapter-deployment.yaml @@ -40,6 +40,13 @@ spec: name: prometheus-adapter ports: - containerPort: 6443 + resources: + limits: + cpu: 250m + memory: 180Mi + requests: + cpu: 102m + memory: 180Mi volumeMounts: - mountPath: /tmp name: tmpfs -- GitLab