[CPS] Fix issues in the ncmp-dmi-plugin charts

- added serviceMonitor and removed annotation for prometheus scraping
- changed readiness dependency from core-db to core app
- removed unused environment variables
- make cps-core and sdnc url configurable
- Added rolling restart in ncmp-dmi-plugin

Issue-ID: CPS-669
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: Ia4c3ccdac32a97d75b98ce4cbadaf74c5493f06c
diff --git a/kubernetes/cps/components/ncmp-dmi-plugin/templates/deployment.yaml b/kubernetes/cps/components/ncmp-dmi-plugin/templates/deployment.yaml
index d2fd5c9..3d154db 100644
--- a/kubernetes/cps/components/ncmp-dmi-plugin/templates/deployment.yaml
+++ b/kubernetes/cps/components/ncmp-dmi-plugin/templates/deployment.yaml
@@ -23,18 +23,18 @@
 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
 spec:
   replicas: {{ .Values.replicaCount }}
+  minReadySeconds: {{ index .Values.minReadySeconds }}
+  strategy:
+    type: {{ index .Values.updateStrategy.type }}
+    rollingUpdate:
+      maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
+      maxSurge: {{ index .Values.updateStrategy.maxSurge }}
   selector: {{- include "common.selectors" . | nindent 4 }}
   template:
     metadata:
       labels:
         app.kubernetes.io/name: {{ include "common.name" . }}
         app.kubernetes.io/instance: {{ include "common.release" . }}
-      {{- if .Values.prometheus.enabled }}
-      annotations:
-        prometheus.io/scrape: "true"
-        prometheus.io/path: 'manage/prometheus'
-        prometheus.io/port: {{ .Values.managementPort | quote }}
-      {{- end }}
     spec:
       {{ include "common.podSecurityContext" . | indent 6 | trim}}
       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . ) }}
@@ -49,17 +49,17 @@
           - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config/${PFILE}; done"
         env:
           - name: DMI_PLUGIN_USERNAME
-            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "user-creds" "key" "login") | indent 12 }}
+            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "app-user-creds" "key" "login") | indent 12 }}
           - name: DMI_PLUGIN_PASSWORD
-            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "user-creds" "key" "password") | indent 12 }}
+            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "app-user-creds" "key" "password") | indent 12 }}
           - name: SDNC_USERNAME
             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdnc-creds" "key" "login") | indent 12 }}
           - name: SDNC_PASSWORD
             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdnc-creds" "key" "password") | indent 12 }}
           - name: CPS_CORE_USERNAME
-            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "core-creds" "key" "login") | indent 12 }}
+            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cps-core-creds" "key" "login") | indent 12 }}
           - name: CPS_CORE_PASSWORD
-            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "core-creds" "key" "password") | indent 12 }}
+            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cps-core-creds" "key" "password") | indent 12 }}
         volumeMounts:
           - mountPath: /config-input
             name: init-data-input
@@ -101,9 +101,6 @@
           - mountPath: /app/resources/application-helm.yml
             subPath: application-helm.yml
             name: init-data
-          - mountPath: /app/resources/logback.xml
-            subPath: logback.xml
-            name: init-data
           - mountPath: /tmp
             name: init-temp
       volumes: