Containers time zone sync
[oom.git] / kubernetes / aai / templates / aai-resources-deployment.yaml
index b6242ee..c61bc6f 100644 (file)
@@ -12,6 +12,32 @@ spec:
       labels:
         app: aai-resources
       name: aai-resources
+      annotations:
+        pod.beta.kubernetes.io/init-containers: '[
+          {
+              "args": [
+                  "--container-name",
+                  "hbase"
+              ],
+              "command": [
+                  "/root/ready.py"
+              ],
+              "env": [
+                  {
+                      "name": "NAMESPACE",
+                      "valueFrom": {
+                          "fieldRef": {
+                              "apiVersion": "v1",
+                              "fieldPath": "metadata.namespace"
+                          }
+                      }
+                  }
+              ],
+              "image": "{{ .Values.image.readiness }}",
+              "imagePullPolicy": "{{ .Values.pullPolicy }}",
+              "name": "aai-resources-readiness"
+          }
+        ]'      
     spec:
       containers:
       - name: aai-resources
@@ -29,12 +55,15 @@ spec:
         - name: CHEF_GIT_URL
           value: http://gerrit.onap.org/r/aai
         volumeMounts:
-        - mountPath: /opt/aai/logroot/AAI-RES/
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+        - mountPath: /opt/aai/logroot/
           name: aai-resources-logs
-        - mountPath: /var/chef/aai-config/
-          name: aai-config
         - mountPath: /var/chef/aai-data/
           name: aai-data
+        - mountPath: /docker-entrypoint.sh
+          name: entrypoint-override
         ports:
         - containerPort: 8447
         readinessProbe:
@@ -43,15 +72,18 @@ spec:
           initialDelaySeconds: 5
           periodSeconds: 10
       volumes:
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
       - name: aai-resources-logs
         hostPath:
           path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/aai-resources/logs/"
-      - name: aai-config
-        hostPath:
-          path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/aai-config/"
       - name: aai-data
         hostPath:
           path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/aai-data/"
+      - name: entrypoint-override
+        hostPath:
+          path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/aai-resources/docker-entrypoint.sh"
       restartPolicy: Always
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"