From 196dc486d5beff1b1e866872a61fc936db4bd107 Mon Sep 17 00:00:00 2001 From: Tyler Schade Date: Mon, 30 Sep 2024 08:06:27 -0400 Subject: [PATCH] Add ability to specify resources in helm chart (#375) * add ability to specify resources in helm chart Signed-off-by: Tyler Schade * --amend Signed-off-by: Tyler Schade * --amend Signed-off-by: Tyler Schade --------- Signed-off-by: Tyler Schade --- chart/templates/deployment.yaml | 16 ++++++++-------- chart/values.yaml | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index d9fdcfd85..96d389713 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -64,11 +64,11 @@ spec: protocol: TCP resources: limits: - cpu: 500m - memory: 128Mi + cpu: {{ .Values.proxy.resources.limits.cpu }} + memory: {{ .Values.proxy.resources.limits.memory }} requests: - cpu: 5m - memory: 64Mi + cpu: {{ .Values.proxy.resources.requests.cpu }} + memory: {{ .Values.proxy.resources.requests.memory }} securityContext: allowPrivilegeEscalation: false capabilities: @@ -101,11 +101,11 @@ spec: periodSeconds: 10 resources: limits: - cpu: 500m - memory: 512Mi + cpu: {{ .Values.operator.resources.limits.cpu }} + memory: {{ .Values.operator.resources.limits.memory }} requests: - cpu: 10m - memory: 64Mi + cpu: {{ .Values.operator.resources.requests.cpu }} + memory: {{ .Values.operator.resources.requests.memory }} securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/chart/values.yaml b/chart/values.yaml index 9dae758ca..54acfceb6 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -49,6 +49,21 @@ proxy: image: gcr.io/kubebuilder/kube-rbac-proxy:v0.16.0 # We're commenting out the imagePullPolicy to use k8s defaults # imagePullPolicy: IfNotPresent + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi +operator: + resources: + limits: + cpu: 500m + memory: 512Mi + requests: + cpu: 10m + memory: 64Mi # setting this to true will add resources required to generate the bundle using operator-sdk bundleGeneration: false