From f25565dff50973ce38555044f7e6127017fc35c9 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Mon, 18 Nov 2024 10:15:00 +0100 Subject: [PATCH] fix: Add more bangs and whistles to puller --- Chart.yaml | 1 + templates/deployment.yaml | 31 ++++++++++++++++++++++++++++++- values.yaml | 6 ++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/Chart.yaml b/Chart.yaml index 79afa0b..ee37c95 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,6 +1,7 @@ # Chart.yaml apiVersion: v2 name: basic-app +PullName: basic-app-puller description: A basic Helm chart for Kubernetes type: application version: 0.1.0 diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 487064e..280aaa7 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -55,13 +55,42 @@ spec: {{- end }} - name: {{ .Chart.PullName }} image: "{{ .Values.puller.image.repository }}:{{ .Values.puller.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} + imagePullPolicy: {{ .Values.puller.image.pullPolicy }} ports: - containerPort: 80 protocol: TCP volumeMounts: - name: data mountPath: /data + env: + {{- with .Values.env.plain }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- range .Values.env.configMapKeys }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ .configMapName }} + key: {{ .key }} + {{- end }} + {{- range .Values.env.secretKeys }} + - name: {{ .name }} + valueFrom: + secretKeyRef: + name: {{ .secretName }} + key: {{ .key }} + {{- end }} + envFrom: + {{- range .Values.env.configMapRefs }} + - configMapRef: + name: {{ .name }} + optional: {{ .optional | default false }} + {{- end }} + {{- range .Values.env.secretRefs }} + - secretRef: + name: {{ .name }} + optional: {{ .optional | default false }} + {{- end }} volumes: - name: data persistentVolumeClaim: diff --git a/values.yaml b/values.yaml index 4aa7a16..fc5b3ef 100644 --- a/values.yaml +++ b/values.yaml @@ -5,6 +5,12 @@ image: pullPolicy: IfNotPresent tag: "latest" +puller: + image: + repository: nginx + pullPolicy: IfNotPresent + tag: "latest" + service: type: ClusterIP port: 80