Fix the helm install failed
[pti/o2.git] / charts / templates / deployment.yaml
index 29e387f..19d7431 100644 (file)
@@ -64,8 +64,10 @@ spec:
           volumeMounts:
             - name: scripts
               mountPath: /opt
+            {{- if .Values.db.persistence }}
             - name: db-pv
               mountPath: /var/lib/postgresql/data
+            {{- end }}
         - name: redis
           image: "{{ .Values.o2ims.images.tags.redis }}"
           ports:
@@ -124,6 +126,12 @@ spec:
               value: "1"
             - name: REDIS_HOST
               value: localhost
+            {{- if default false .Values.o2ims.useHostCert }}
+            - name: REQUESTS_CA_BUNDLE
+              value: /etc/ssl/custom-cert.pem
+            {{- end }}
+            - name: CGTS_INSECURE_SSL
+              value: {{ ternary "1" "0" (default false .Values.o2ims.cgtsInsecureSSL) | quote }}
           volumeMounts:
             - name: scripts
               mountPath: /opt
@@ -131,6 +139,11 @@ spec:
               mountPath: /configs/o2app.conf
               subPath: config.json
               readOnly: true
+            {{- if default false .Values.o2ims.useHostCert }}
+            - name: ca-certs
+              mountPath: /etc/ssl/custom-cert.pem
+              readOnly: true
+            {{- end }}
         - name: o2api
           image: "{{ .Values.o2ims.images.tags.o2service }}"
           ports:
@@ -219,7 +232,15 @@ spec:
         - configMap:
             name: {{ .Chart.Name }}-smocacrt
           name: smocacrt
+        {{- if .Values.db.persistence }}
         - name: db-pv
           persistentVolumeClaim:
             claimName: {{ .Chart.Name }}-db-pv
+        {{- end }}
+        {{- if default false .Values.o2ims.useHostCert }}
+        - name: ca-certs
+          hostPath:
+            path: {{ .Values.o2ims.hostCertPath | quote }}
+            type: File
+        {{- end }}
 ---