Merge "Upgrade APPC to use common mariadb galera charts"
[oom.git] / kubernetes / aai / charts / aai-sparky-be / templates / deployment.yaml
index 05a808e..48235bc 100644 (file)
@@ -1,4 +1,5 @@
 # Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 AT&T
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -35,64 +36,72 @@ spec:
       name: {{ include "common.name" . }}
     spec:
       initContainers:
-      - name: {{ include "common.name" . }}-inject-models
-        command:
-        - /bin/bash
-        - "-c"
-        - |
-          git clone -b {{ .Values.config.gerritBranch }} --single-branch {{ .Values.config.gerritProject }} /tmp/gerrit
-          cp -rp /tmp/gerrit/data-router/appconfig/model/* /model-dir
-        image: "{{ .Values.global.repository | default .Values.dockerHubRepository }}/{{ .Values.ubuntuInitImage }}"
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - aai-elasticsearch
+        - --container-name
+        - aai-search-data
+        - --container-name
+        - aai
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        volumeMounts:
-        - name: modeldir
-          mountPath: "/model-dir"
+        name: {{ include "common.name" . }}-readiness
       containers:
       - name: {{ include "common.name" . }}
-        image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        env:
-        - name: CONFIG_HOME
-          value: /opt/app/sparky/config/
-        - name: KEY_MANAGER_PASSWORD
-          value: {{ .Values.config.keyManagerPassword }}
-        - name: KEY_STORE_PASSWORD
-          value: {{ .Values.config.keyStorePassword }}
+
         volumeMounts:
         - mountPath: /etc/localtime
           name: localtime
           readOnly: true
         - mountPath: /opt/app/sparky/config/auth/
           name: {{ include "common.fullname" . }}-auth-config
-        - mountPath: /opt/app/sparky/config/synchronizer.properties
-          subPath: synchronizer.properties
-          name: {{ include "common.fullname" . }}-config
-        - mountPath: /opt/app/sparky/config/suggestive-search.properties
-          subPath: suggestive-search.properties
-          name: {{ include "common.fullname" . }}-config
-        - mountPath: /opt/app/sparky/config/search-service.properties
-          subPath: search-service.properties
-          name: {{ include "common.fullname" . }}-config
-        - mountPath: /opt/app/sparky/config/roles.config
-          subPath: roles.config
-          name: {{ include "common.fullname" . }}-config
-        - mountPath: /opt/app/sparky/config/elasticsearch.properties
-          subPath: elasticsearch.properties
-          name: {{ include "common.fullname" . }}-config
-        - mountPath: /opt/app/sparky/config/aai.properties
-          subPath: aai.properties
-          name: {{ include "common.fullname" . }}-config
+
         - mountPath: /opt/app/sparky/config/portal/
           name: {{ include "common.fullname" . }}-portal-config
+
+        - mountPath: /opt/app/sparky/config/portal/BOOT-INF/classes/
+          name: {{ include "common.fullname" . }}-portal-config-props
+
         - mountPath: /var/log/onap
           name: {{ include "common.fullname" . }}-logs
-        - mountPath: /opt/app/sparky/bundleconfig/etc/logback.xml
-          name: {{ include "common.fullname" . }}-log-conf
-          subPath: logback.xml
-        - name: modeldir
-          mountPath: /opt/app/sparky/config/model
+
+        - mountPath:  /opt/app/sparky/config/application.properties
+          name: {{ include "common.fullname" . }}-properties
+          subPath: application.properties
+
+        - mountPath:  /opt/app/sparky/config/application-resources.properties
+          name: {{ include "common.fullname" . }}-properties
+          subPath: application-resources.properties
+
+        - mountPath:  /opt/app/sparky/config/application-ssl.properties
+          name: {{ include "common.fullname" . }}-properties
+          subPath: application-ssl.properties
+
+        - mountPath:  /opt/app/sparky/config/application-oxm-default.properties
+          name: {{ include "common.fullname" . }}-properties
+          subPath: application-oxm-default.properties
+          
+        - mountPath:  /opt/app/sparky/config/application-oxm-override.properties
+          name: {{ include "common.fullname" . }}-properties
+          subPath: application-oxm-override.properties
+
+        - mountPath:  /opt/app/sparky/config/application-oxm-schema-prod.properties
+          name: {{ include "common.fullname" . }}-properties
+          subPath: application-oxm-schema-prod.properties
+        
         ports:
         - containerPort: {{ .Values.service.internalPort }}
+        - containerPort: {{ .Values.service.internalPort2 }}
         # disable liveness probe when breakpoints set in debugger
         # so K8s doesn't restart unresponsive container
         {{- if eq .Values.liveness.enabled true }}
@@ -135,12 +144,23 @@ spec:
       - name: localtime
         hostPath:
           path: /etc/localtime
+
+      - name: {{ include "common.fullname" . }}-properties
+        configMap:
+          name: {{ include "common.fullname" . }}-prop
+
       - name: {{ include "common.fullname" . }}-config
         configMap:
           name: {{ include "common.fullname" . }}
+
       - name: {{ include "common.fullname" . }}-portal-config
         configMap:
           name: {{ include "common.fullname" . }}-portal
+
+      - name: {{ include "common.fullname" . }}-portal-config-props
+        configMap:
+          name: {{ include "common.fullname" . }}-portal-props
+
       - name: {{ include "common.fullname" . }}-auth-config
         secret:
           secretName: {{ include "common.fullname" . }}
@@ -151,9 +171,6 @@ spec:
         emptyDir: {}
       - name: aai-sparky-filebeat
         emptyDir: {}
-      - name: {{ include "common.fullname" . }}-log-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-log
       - name: modeldir
         emptyDir: {}
       restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}