From db1a035070aa12504012baeaea3ffe35106bf2ee Mon Sep 17 00:00:00 2001 From: Thomas Jouffroy <78230990+tjouffroy@users.noreply.github.com> Date: Thu, 3 Apr 2025 11:34:45 +0200 Subject: [PATCH 1/3] manage resources variables --- helm/trident-operator/templates/deployment.yaml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/helm/trident-operator/templates/deployment.yaml b/helm/trident-operator/templates/deployment.yaml index 69d4a3be1..3deaf37e9 100644 --- a/helm/trident-operator/templates/deployment.yaml +++ b/helm/trident-operator/templates/deployment.yaml @@ -69,13 +69,9 @@ spec: image: {{ include "trident-operator.image" $ }} imagePullPolicy: {{ .Values.imagePullPolicy }} name: trident-operator - resources: - requests: - cpu: "10m" - memory: "40Mi" - limits: - cpu: "20m" - memory: "80Mi" + {{- if .Values.resources }} + resources: {{ toYaml .Values.resources | nindent 12 }} + {{- end }} {{- if and (eq .Values.cloudProvider "Azure") (eq .Values.cloudIdentity "") }} volumes: - name: azure-cred From 889d8b0dbd0867f353815c2fb1a8e7a6f52741a1 Mon Sep 17 00:00:00 2001 From: Thomas Jouffroy <78230990+tjouffroy@users.noreply.github.com> Date: Thu, 3 Apr 2025 11:37:23 +0200 Subject: [PATCH 2/3] add default values for resources --- helm/trident-operator/values.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/helm/trident-operator/values.yaml b/helm/trident-operator/values.yaml index 96be59d69..f99688b55 100644 --- a/helm/trident-operator/values.yaml +++ b/helm/trident-operator/values.yaml @@ -186,3 +186,12 @@ ontapConfigurator: svmName: '' protocols: [] authType: '' + +# ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +resources: + requests: + cpu: "10m" + memory: "40Mi" + limits: + cpu: "20m" + memory: "80Mi" From cb03aa3157c825cf92c3014a53f91a15a2d639a2 Mon Sep 17 00:00:00 2001 From: Thomas Jouffroy <78230990+tjouffroy@users.noreply.github.com> Date: Thu, 3 Apr 2025 12:03:28 +0200 Subject: [PATCH 3/3] typo update after testing --- helm/trident-operator/templates/deployment.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/helm/trident-operator/templates/deployment.yaml b/helm/trident-operator/templates/deployment.yaml index 3deaf37e9..7598e3867 100644 --- a/helm/trident-operator/templates/deployment.yaml +++ b/helm/trident-operator/templates/deployment.yaml @@ -52,6 +52,10 @@ spec: {{- if .Values.operatorDebug }} - -debug {{- end }} + {{- with .Values.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} env: - name: POD_NAME valueFrom: @@ -69,9 +73,6 @@ spec: image: {{ include "trident-operator.image" $ }} imagePullPolicy: {{ .Values.imagePullPolicy }} name: trident-operator - {{- if .Values.resources }} - resources: {{ toYaml .Values.resources | nindent 12 }} - {{- end }} {{- if and (eq .Values.cloudProvider "Azure") (eq .Values.cloudIdentity "") }} volumes: - name: azure-cred