[GENERAL] Use readiness container v3.0.1
[oom.git] / kubernetes / sdc / charts / sdc-wfd-be / templates / deployment.yaml
index 7490b47..92fe5f2 100644 (file)
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.fullname" . }}
@@ -24,6 +24,9 @@ metadata:
     release: {{ include "common.release" . }}
     heritage: {{ .Release.Service }}
 spec:
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
   replicas: {{ .Values.replicaCount }}
   template:
     metadata:
@@ -34,10 +37,10 @@ spec:
       initContainers:
       {{- if .Values.initJob.enabled }}
       - name: {{ include "common.name" . }}-job-completion
-        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
         imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
         command:
-        - /root/job_complete.py
+        - /app/ready.py
         args:
         - --job-name
         - {{ include "common.fullname" . }}-workflow-init
@@ -115,5 +118,16 @@ spec:
           - name: SERVER_SSL_TRUST_PASSWORD
             valueFrom:
               secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: truststore_password}
+          volumeMounts:
+          - name: sdc-cert
+            mountPath: /keystore
+            subPath: org.onap.sdc.p12
+          - name: sdc-cert
+            mountPath: /truststore
+            subPath: org.onap.sdc.trust.jks
+      volumes:
+        - name: sdc-cert
+          secret:
+            secretName: sdc-cert
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"