From 0b546f1526d3390f3b54b21644ba3ba48772b798 Mon Sep 17 00:00:00 2001 From: Xtigyro Date: Mon, 30 Nov 2020 16:32:31 +0000 Subject: [PATCH 1/2] put resource limits on apps --- .../kubernetes-dashboard.yaml.gotmpl | 7 ++++++ .../apps/default/metallb/metallb.yaml.gotmpl | 16 +++++++++++++ .../metrics-server/metrics-server.yaml.gotmpl | 7 ++++++ .../nginx-ingress-controller.yaml.gotmpl | 15 ++++++++++++ .../weave-scope/weave-scope.yaml.gotmpl | 24 +++++++++++++++++++ 5 files changed, 69 insertions(+) diff --git a/helmfiles/apps/default/kubernetes-dashboard/kubernetes-dashboard.yaml.gotmpl b/helmfiles/apps/default/kubernetes-dashboard/kubernetes-dashboard.yaml.gotmpl index b5ff6a8..9f5ac1c 100644 --- a/helmfiles/apps/default/kubernetes-dashboard/kubernetes-dashboard.yaml.gotmpl +++ b/helmfiles/apps/default/kubernetes-dashboard/kubernetes-dashboard.yaml.gotmpl @@ -10,3 +10,10 @@ settings: itemsPerPage: 40 logsAutoRefreshTimeInterval: 5 resourceAutoRefreshTimeInterval: 5 +resources: + requests: + cpu: 50m + memory: 200Mi + limits: + cpu: 200m + memory: 200Mi diff --git a/helmfiles/apps/default/metallb/metallb.yaml.gotmpl b/helmfiles/apps/default/metallb/metallb.yaml.gotmpl index a94e357..34f8456 100644 --- a/helmfiles/apps/default/metallb/metallb.yaml.gotmpl +++ b/helmfiles/apps/default/metallb/metallb.yaml.gotmpl @@ -4,3 +4,19 @@ configInline: protocol: layer2 addresses: - {{ requiredEnv "KINDADM_KIND_NETW_SHORT" }}.0.1-{{ requiredEnv "KINDADM_KIND_NETW_SHORT" }}.255.255 +controller: + resources: + limits: + cpu: 100m + memory: 100Mi + requests: + memory: 25Mi + cpu: 25m +speaker: + resources: + limits: + cpu: 100m + memory: 100Mi + requests: + memory: 25Mi + cpu: 25m diff --git a/helmfiles/apps/default/metrics-server/metrics-server.yaml.gotmpl b/helmfiles/apps/default/metrics-server/metrics-server.yaml.gotmpl index 45203fe..98d33b1 100644 --- a/helmfiles/apps/default/metrics-server/metrics-server.yaml.gotmpl +++ b/helmfiles/apps/default/metrics-server/metrics-server.yaml.gotmpl @@ -4,3 +4,10 @@ extraArgs: kubelet-preferred-address-types: InternalIP,ExternalIP,Hostname apiService: create: true +resources: + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 50m + memory: 256Mi diff --git a/helmfiles/apps/default/nginx-ingress-controller/nginx-ingress-controller.yaml.gotmpl b/helmfiles/apps/default/nginx-ingress-controller/nginx-ingress-controller.yaml.gotmpl index 36b8b05..f78e398 100644 --- a/helmfiles/apps/default/nginx-ingress-controller/nginx-ingress-controller.yaml.gotmpl +++ b/helmfiles/apps/default/nginx-ingress-controller/nginx-ingress-controller.yaml.gotmpl @@ -6,3 +6,18 @@ daemonset: useHostPort: true metrics: enabled: true +resources: + limits: + cpu: 150m + memory: 256Mi + requests: + cpu: 50m + memory: 128Mi +defaultBackend: + resources: + limits: + cpu: 150m + memory: 256Mi + requests: + cpu: 50m + memory: 128Mi diff --git a/helmfiles/apps/optional/weave-scope/weave-scope.yaml.gotmpl b/helmfiles/apps/optional/weave-scope/weave-scope.yaml.gotmpl index e19db41..02d8689 100644 --- a/helmfiles/apps/optional/weave-scope/weave-scope.yaml.gotmpl +++ b/helmfiles/apps/optional/weave-scope/weave-scope.yaml.gotmpl @@ -1,3 +1,27 @@ global: image: tag: master-bf6af9cf +weave-scope-frontend: + resources: + requests: + cpu: 25m + memory: 200Mi + limits: + cpu: 150m + memory: 200Mi +weave-scope-agent: + resources: + requests: + cpu: 25m + memory: 200Mi + limits: + cpu: 100m + memory: 200Mi +weave-scope-cluster-agent: + resources: + requests: + cpu: 25m + memory: 200Mi + limits: + cpu: 100m + memory: 200Mi From 7035dd2c762328b68862778bae6f39d5071a390f Mon Sep 17 00:00:00 2001 From: Xtigyro Date: Mon, 30 Nov 2020 16:36:52 +0000 Subject: [PATCH 2/2] put resource limits on apps - lower --- .../kubernetes-dashboard.yaml.gotmpl | 2 +- .../metrics-server/metrics-server.yaml.gotmpl | 2 +- .../optional/weave-scope/weave-scope.yaml.gotmpl | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/helmfiles/apps/default/kubernetes-dashboard/kubernetes-dashboard.yaml.gotmpl b/helmfiles/apps/default/kubernetes-dashboard/kubernetes-dashboard.yaml.gotmpl index 9f5ac1c..98982ed 100644 --- a/helmfiles/apps/default/kubernetes-dashboard/kubernetes-dashboard.yaml.gotmpl +++ b/helmfiles/apps/default/kubernetes-dashboard/kubernetes-dashboard.yaml.gotmpl @@ -13,7 +13,7 @@ settings: resources: requests: cpu: 50m - memory: 200Mi + memory: 100Mi limits: cpu: 200m memory: 200Mi diff --git a/helmfiles/apps/default/metrics-server/metrics-server.yaml.gotmpl b/helmfiles/apps/default/metrics-server/metrics-server.yaml.gotmpl index 98d33b1..abd8026 100644 --- a/helmfiles/apps/default/metrics-server/metrics-server.yaml.gotmpl +++ b/helmfiles/apps/default/metrics-server/metrics-server.yaml.gotmpl @@ -10,4 +10,4 @@ resources: memory: 256Mi requests: cpu: 50m - memory: 256Mi + memory: 128Mi diff --git a/helmfiles/apps/optional/weave-scope/weave-scope.yaml.gotmpl b/helmfiles/apps/optional/weave-scope/weave-scope.yaml.gotmpl index 02d8689..4b5fe7e 100644 --- a/helmfiles/apps/optional/weave-scope/weave-scope.yaml.gotmpl +++ b/helmfiles/apps/optional/weave-scope/weave-scope.yaml.gotmpl @@ -5,23 +5,23 @@ weave-scope-frontend: resources: requests: cpu: 25m - memory: 200Mi + memory: 100Mi limits: cpu: 150m - memory: 200Mi + memory: 150Mi weave-scope-agent: resources: requests: cpu: 25m - memory: 200Mi + memory: 100Mi limits: cpu: 100m - memory: 200Mi + memory: 150Mi weave-scope-cluster-agent: resources: requests: cpu: 25m - memory: 200Mi + memory: 100Mi limits: cpu: 100m - memory: 200Mi + memory: 150Mi