[POLICY] Migration of clamp to policy area
[oom.git] / kubernetes / policy / components / policy-clamp-be / templates / deployment.yaml
@@ -40,8 +40,8 @@ spec:
       - command:
         - /app/ready.py
         args:
-        - --container-name
-        - clamp-mariadb
+        - --job-name
+        - {{ include "common.release" . }}-policy-clamp-galera-config
         env:
         - name: NAMESPACE
           valueFrom:
@@ -61,14 +61,14 @@ spec:
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           command:
           - sh
-          workingDir: "/opt/clamp/"
+          workingDir: "/opt/policy/clamp/"
           args:
           - -c
           - |
           {{- if .Values.global.aafEnabled }}
             export $(grep '^cadi_' {{ .Values.certInitializer.credsPath }}/org.onap.clamp.cred.props | xargs -0)
           {{- end }}
-            java -Djava.security.egd=file:/dev/./urandom ${JAVA_RAM_CONFIGURATION} -jar ./app.jar
+            java -Djava.security.egd=file:/dev/./urandom ${JAVA_RAM_CONFIGURATION} -jar ./policy-clamp-backend.jar
           ports:
           - containerPort: {{ .Values.service.internalPort }}
           # disable liveness probe when breakpoints set in debugger
@@ -88,19 +88,17 @@ spec:
           volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
           - name: logs
             mountPath: {{ .Values.log.path }}
-          - mountPath: /opt/clamp/sdc-controllers-config.json
+          - mountPath: /opt/policy/clamp/sdc-controllers-config.json
             name: {{ include "common.fullname" . }}-config
             subPath: sdc-controllers-config.json
-          - mountPath: /opt/clamp/application.properties
+          - mountPath: /opt/policy/clamp/application.properties
             name: {{ include "common.fullname" . }}-config
             subPath: application.properties
           env:
           - name: MYSQL_USER
-            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
+            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-creds" "key" "login") | indent 12 }}
           - name: MYSQL_PASSWORD
-            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
-          - name: MYSQL_DATABASE
-            value: {{ tpl .Values.db.databaseName .}}
+            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-creds" "key" "password") | indent 12 }}
           {{-  if ne "unlimited" (include "common.flavor" .) }}
           - name: JAVA_RAM_CONFIGURATION
             value: -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=75
@@ -115,7 +113,7 @@ spec:
       volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
         - name: {{ include "common.fullname" . }}-config
           configMap:
-            name: {{ include "common.fullname" . }}
+            name: {{ include "common.fullname" . }}-configmap
             items:
             - key: sdc-controllers-config.json
               path: sdc-controllers-config.json