Rename ssl related files and variable names to make it more clear.
[pti/o2.git] / charts / templates / deployment.yaml
index a9ea8fd..bcc8dc9 100644 (file)
@@ -33,6 +33,8 @@ spec:
       serviceAccountName: {{ .Values.o2ims.serviceaccountname }}
       # imagePullSecrets:
       #   - name: {{ .Values.o2ims.imagePullSecrets }}
+      imagePullSecrets:
+        - name: {{ .Values.o2ims.serviceaccountname }}-registry-secret
 {{- if .Values.o2ims.affinity }}
       affinity:
 {{ toYaml .Values.o2ims.affinity | indent 8 }}
@@ -80,6 +82,10 @@ spec:
           volumeMounts:
             - name: scripts
               mountPath: /opt
+            - name: applicationconfig
+              mountPath: /configs/o2app.conf
+              subPath: config.json
+              readOnly: true
         - name: watcher
           image: "{{ .Values.o2ims.image.repository }}:{{ .Values.o2ims.image.tag }}"
           command: ["/bin/bash", "/opt/o2watcher_start.sh"]
@@ -105,6 +111,10 @@ spec:
           volumeMounts:
             - name: scripts
               mountPath: /opt
+            - name: applicationconfig
+              mountPath: /configs/o2app.conf
+              subPath: config.json
+              readOnly: true
         - name: o2api
           image: "{{ .Values.o2ims.image.repository }}:{{ .Values.o2ims.image.tag }}"
           ports:
@@ -137,8 +147,24 @@ spec:
           volumeMounts:
             - name: scripts
               mountPath: /opt
-            - name: configs
-              mountPath: /configs
+            # - name: configs
+            #   mountPath: /configs
+            - name: applicationconfig
+              mountPath: /configs/o2app.conf
+              subPath: config.json
+              readOnly: true
+            - name: servercrt
+              mountPath: /configs/server.crt
+              subPath: config.json
+              readOnly: true
+            - name: serverkey
+              mountPath: /configs/server.key
+              subPath: config.json
+              readOnly: true
+            - name: smocacrt
+              mountPath: /configs/smoca.crt
+              subPath: config.json
+              readOnly: true
         - name: helmcli
           image: "{{ .Values.o2ims.image.repository }}:{{ .Values.o2ims.image.tag }}"
           ports:
@@ -152,12 +178,22 @@ spec:
           volumeMounts:
             - name: scripts
               mountPath: /opt
-            - name: configs
-              mountPath: /configs
       volumes:
         - name: scripts
           configMap:
             name: {{ .Chart.Name }}-scripts-configmap
-        - name: configs
-          emptyDir: {}
+        # - name: configs
+        #   emptyDir: {}
+        - configMap:
+            name: {{ .Chart.Name }}-application-config
+          name: applicationconfig
+        - configMap:
+            name: {{ .Chart.Name }}-serverkey
+          name: serverkey
+        - configMap:
+            name: {{ .Chart.Name }}-servercrt
+          name: servercrt
+        - configMap:
+            name: {{ .Chart.Name }}-smocacrt
+          name: smocacrt
 ---