From 7f5951eba93585b005af306b0470f36cf6649ec8 Mon Sep 17 00:00:00 2001
From: Dominik Hebeler <dominik@suma-ev.de>
Date: Thu, 30 Nov 2023 14:28:18 +0100
Subject: [PATCH] deploy correct containers

---
 maps/templates/deployment.yaml | 25 +++++++++++++++++++++++--
 maps/values.yaml               |  7 ++-----
 2 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/maps/templates/deployment.yaml b/maps/templates/deployment.yaml
index cafa592..d666b32 100644
--- a/maps/templates/deployment.yaml
+++ b/maps/templates/deployment.yaml
@@ -31,7 +31,28 @@ spec:
       securityContext:
         {{- toYaml .Values.podSecurityContext | nindent 8 }}
       containers:
-        - name: {{ .Chart.Name }}
+        - name: fpm
+          securityContext:
+            {{- toYaml .Values.securityContext | nindent 12 }}
+          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          ports:
+            - name: fpm
+              containerPort: 9000
+              protocol: TCP
+          livenessProbe:
+            tcpSocket:
+              port: fpm
+          readinessProbe:
+            tcpSocket:
+              port: fpm
+          resources:
+            {{- toYaml .Values.resources | nindent 12 }}
+          {{- with .Values.fpm.volumeMounts }}
+          volumeMounts:
+            {{- toYaml . | nindent 12 }}
+          {{- end }}
+        - name: nginx
           securityContext:
             {{- toYaml .Values.securityContext | nindent 12 }}
           image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
@@ -50,7 +71,7 @@ spec:
               port: http
           resources:
             {{- toYaml .Values.resources | nindent 12 }}
-          {{- with .Values.volumeMounts }}
+          {{- with .Values.fpm.volumeMounts }}
           volumeMounts:
             {{- toYaml . | nindent 12 }}
           {{- end }}
diff --git a/maps/values.yaml b/maps/values.yaml
index 60b33b0..67c7ece 100644
--- a/maps/values.yaml
+++ b/maps/values.yaml
@@ -85,11 +85,8 @@ volumes: []
 #     secretName: mysecret
 #     optional: false
 
-# Additional volumeMounts on the output Deployment definition.
-volumeMounts: []
-# - name: foo
-#   mountPath: "/etc/foo"
-#   readOnly: true
+fpm:
+  volumeMounts: []
 
 nodeSelector: {}
 
-- 
GitLab