From fd7ba5e1958966423e0966fcf1ac25f66ce61429 Mon Sep 17 00:00:00 2001 From: piermotte Date: Fri, 25 Feb 2022 08:18:14 +0100 Subject: [PATCH] add env, initContainers, volumeMounts and volumes (#1668) Co-authored-by: Pierre Motte --- charts/kafka-ui/templates/deployment.yaml | 16 ++++++++++++++++ charts/kafka-ui/values.yaml | 8 ++++++++ 2 files changed, 24 insertions(+) diff --git a/charts/kafka-ui/templates/deployment.yaml b/charts/kafka-ui/templates/deployment.yaml index 0f995b837d..630d93c832 100644 --- a/charts/kafka-ui/templates/deployment.yaml +++ b/charts/kafka-ui/templates/deployment.yaml @@ -29,6 +29,10 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.initContainers }} + initContainers: + {{- toYaml . | nindent 8 }} + {{- end }} serviceAccountName: {{ include "kafka-ui.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} @@ -38,6 +42,10 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- with .Values.env }} + env: + {{- toYaml . | nindent 12 }} + {{- end }} envFrom: {{- if .Values.existingConfigMap }} - configMapRef: @@ -73,6 +81,14 @@ spec: timeoutSeconds: 10 resources: {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/kafka-ui/values.yaml b/charts/kafka-ui/values.yaml index 43cbf869f6..33dcfb0b30 100644 --- a/charts/kafka-ui/values.yaml +++ b/charts/kafka-ui/values.yaml @@ -117,3 +117,11 @@ nodeSelector: {} tolerations: [] affinity: {} + +env: {} + +initContainers: {} + +volumeMounts: {} + +volumes: {}