From c32f87f07e1e3c1c0e6a6e823e50115aab5b9271 Mon Sep 17 00:00:00 2001 From: Martin Schmidt Date: Mon, 30 Sep 2024 13:10:45 +0200 Subject: [PATCH] Refactor deployment.yaml and values.yaml Simplify resource configuration in deployment.yaml and values.yaml by using the "common.limits" template. This improves readability and maintainability of the code. --- chart/templates/deployment.yaml | 7 +------ chart/values.yaml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index f7fb5337..f09817f1 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -23,12 +23,7 @@ spec: initContainers: - name: wait-for-migration image: {{ include "common.image" (dict "root" $ "image" $.Values.migrationWaiter.image) }} - resources: - requests: - cpu: 0.1 - limits: - memory: 50Mi - ephemeral-storage: "1Mi" + {{- include "common.limits" $.Values.migrationWaiter | nindent 10 }} securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/chart/values.yaml b/chart/values.yaml index 1476d4da..3c120064 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -238,3 +238,20 @@ migrationWaiter: repository: bitnami/kubectl # tag is the tag to pull defaults to the chart version tag: 1.31.1 + # resources holds the configuration for the resource requests and limits + resources: + # requests holds the configuration for the resource requests + requests: + # cpu defines the cpu request limit for the registry server + cpu: 0.1 + # memory defines the memory request limit for the registry server + memory: + + # limits holds the configuration for the resource limits + limits: + # cpu defines the cpu limit for the registry server + cpu: + # memory defines the memory limit for the registry server + memory: 50Mi + # ephemeralStorage defines the ephemeral storage limit for the verifier server + ephemeralStorage: 100Mi