From 4f2a9ba9b7bd0ccb20c1239c29ec02d784dc6df8 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Sat, 19 Oct 2024 11:23:43 +0200 Subject: [PATCH] . --- templates/_deployment.tpl | 13 +++++++++---- templates/_service.tpl | 2 +- templates/_statefulset.tpl | 14 ++++++++++---- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/templates/_deployment.tpl b/templates/_deployment.tpl index d7b896e..80a64e6 100644 --- a/templates/_deployment.tpl +++ b/templates/_deployment.tpl @@ -44,18 +44,23 @@ spec: {{- range $k, $v := $values.ports }} - name: {{ $k }} containerPort: {{ default $v.port $v.targetPort }} - protocol: {{ default "HTTP" $v.protocol }} {{- end -}} {{- end -}} {{- end }} env: {{- include "lib.environmentVariables" . | default "[]" | nindent 12 }} + {{- with .Values.livenessProbe }} livenessProbe: - {{- toYaml .Values.livenessProbe | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.readinessProbe }} readinessProbe: - {{- toYaml .Values.readinessProbe | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.resources }} resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} {{- with .Values.volumeMounts }} volumeMounts: {{- toYaml . | nindent 12 }} diff --git a/templates/_service.tpl b/templates/_service.tpl index 8ea41ae..9496595 100644 --- a/templates/_service.tpl +++ b/templates/_service.tpl @@ -19,7 +19,7 @@ spec: {{- range $k, $v := $values.ports }} - port: {{ $v.port }} targetPort: {{ default $v.port $v.targetPort }} - protocol: {{ default "HTTP" $v.protocol }} + protocol: {{ default "TCP" $v.protocol }} name: {{ $k }} {{- end }} selector: diff --git a/templates/_statefulset.tpl b/templates/_statefulset.tpl index c0f9add..55bc695 100644 --- a/templates/_statefulset.tpl +++ b/templates/_statefulset.tpl @@ -46,18 +46,24 @@ spec: {{- range $k, $v := $values.ports }} - name: {{ $k }} containerPort: {{ $v.targetPort | default $v.port }} - protocol: {{ $v.protocol }} + protocol: {{ default "TCP" $v.protocol }} {{- end -}} {{- end -}} {{- end }} env: {{- include "lib.environmentVariables" . | default "[]" | nindent 12 }} + {{- with .Values.livenessProbe }} livenessProbe: - {{- toYaml .Values.livenessProbe | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.readinessProbe }} readinessProbe: - {{- toYaml .Values.readinessProbe | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.resources }} resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} volumeMounts: {{- range $i, $values := .Values.volumeClaimTemplates }} - name: {{ $values.name }}