Merge "Config seg sdc deployment"
[oom.git] / kubernetes / vid / templates / vid-server-deployment.yaml
index 5354dba..7f9cb65 100644 (file)
@@ -7,6 +7,7 @@ metadata:
   name: vid-server
   namespace: "{{ .Values.nsPrefix }}-vid"
 spec:
+  replicas: {{ .Values.vidServerReplicas }}
   selector:
     matchLabels:
       app: vid-server
@@ -15,33 +16,22 @@ spec:
       labels:
         app: vid-server
       name: vid-server
-      annotations:
-        pod.beta.kubernetes.io/init-containers: '[
-          {
-              "args": [
-                  "--container-name",
-                  "vid-mariadb"
-              ],
-              "command": [
-                  "/root/ready.py"
-              ],
-              "env": [
-                  {
-                      "name": "NAMESPACE",
-                      "valueFrom": {
-                          "fieldRef": {
-                              "apiVersion": "v1",
-                              "fieldPath": "metadata.namespace"
-                          }
-                      }
-                  }
-              ],
-              "image": "{{ .Values.image.readiness }}",
-              "imagePullPolicy": "{{ .Values.pullPolicy }}",
-              "name": "vid-server-readiness"
-          }
-          ]'
     spec:
+      initContainers:
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - vid-mariadb
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: {{ .Values.image.readiness }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: vid-server-readiness
       containers:
       - env:
         - name: ASDC_CLIENT_REST_HOST
@@ -84,7 +74,7 @@ spec:
           value: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
         - name: VID_MYSQL_MAXCONNECTIONS
           value: "5"
-        image: {{ .Values.image.vid }} 
+        image: {{ .Values.image.vid }}
         imagePullPolicy: {{ .Values.pullPolicy }}
         name: vid-server
         lifecycle:
@@ -101,6 +91,7 @@ spec:
           name: vid-logs
         - mountPath: /tmp/logback.xml
           name: vid-logback
+          subPath: logback.xml
         readinessProbe:
           tcpSocket:
             port: 8080
@@ -112,6 +103,7 @@ spec:
         volumeMounts:
         - mountPath: /usr/share/filebeat/filebeat.yml
           name: filebeat-conf
+          subPath: filebeat.yml
         - mountPath: /var/log/onap
           name: vid-logs
         - mountPath: /usr/share/filebeat/data
@@ -121,15 +113,15 @@ spec:
           hostPath:
             path: /etc/localtime
         - name: filebeat-conf
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+          configMap:
+            name: vid-filebeat-configmap
         - name: vid-logs
           emptyDir: {}
         - name: vid-data-filebeat
           emptyDir: {}
         - name: vid-logback
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/vid/logback.xml
+          configMap:
+            name: vid-log-configmap
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
 #{{ end }}