From 4ecc9def1a8e4bbae1688f646cf18b285fe5f547 Mon Sep 17 00:00:00 2001 From: Venkatesh N Date: Wed, 15 May 2024 22:05:10 +0530 Subject: [PATCH] S-108712 Review changes --- templates/release-statefulset.yaml | 6 ++++-- values.yaml | 9 --------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/templates/release-statefulset.yaml b/templates/release-statefulset.yaml index a798471c..97db7956 100644 --- a/templates/release-statefulset.yaml +++ b/templates/release-statefulset.yaml @@ -102,6 +102,7 @@ spec: value: {{ include "postgresql.subchart" . }} - name: POSTGRESQL_PORT value: {{ (include "release.postgresql.service.port" .) | quote }} + resources: {{- include "common.resources.preset" (dict "type" "nano") | nindent 12 }} {{- end }} {{- if and (not .Values.external.mq.enabled) .Values.rabbitmq.install }} - name: wait-for-rabbitmq @@ -120,6 +121,7 @@ spec: value: {{ include "rabbitmq.subchart" . }} - name: RABBITMQ_PORT value: {{ .Values.rabbitmq.service.ports.amqp | quote }} + resources: {{- include "common.resources.preset" (dict "type" "nano") | nindent 12 }} {{- end }} {{- end }} {{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }} @@ -135,8 +137,8 @@ spec: securityContext: {{- .Values.volumePermissions.containerSecurityContext | toYaml | nindent 12 }} {{- if .Values.volumePermissions.resources }} resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }} - {{- else if ne .Values.volumePermissions.resourcesPreset "none" }} - resources: {{- include "release.resources.preset" (dict "type" .Values.volumePermissions.resourcesPreset) | nindent 12 }} + {{- else }} + resources: {{- include "common.resources.preset" (dict "type" "nano") | nindent 12 }} {{- end }} volumeMounts: {{- range $path := .Values.persistence.paths }} diff --git a/values.yaml b/values.yaml index d72bb890..d58a9879 100644 --- a/values.yaml +++ b/values.yaml @@ -1376,15 +1376,6 @@ volumePermissions: find "${path}" -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | \ xargs -r chown -R "{{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }}" done - ## Init Container resource requests and limits - ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - ## We usually recommend not to specify default resources and to leave this as a conscious - ## choice for the user. This also increases chances charts run on environments with little - ## resources, such as Minikube. If you do want to specify resources, uncomment the following - ## lines, adjust them as necessary, and remove the curly braces after 'resources:'. - ## @param volumePermissions.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if volumePermissions.resources is set (volumePermissions.resources is recommended for production). - ## - resourcesPreset: "nano" ## @param volumePermissions.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads) ## @param volumePermissions.resources.limits Init container volume-permissions resource limits ## @param volumePermissions.resources.requests Init container volume-permissions resource requests