Add K8S deployment above Vagrant
[sdc.git] / sdc-os-chef / kubernetes / sdc / templates / deployments / sdc-fe.yaml
index c21efdc..49f5bb3 100644 (file)
@@ -17,7 +17,8 @@ spec:
       name: sdc-fe
     spec:
       initContainers:
-      - command:
+      - name: sdc-fe-readiness
+        command:
         - /root/ready.py
         args:
         - --container-name
@@ -34,9 +35,8 @@ spec:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdc-fe-readiness
+        image: "{{ .Values.image.readiness }}"
+        imagePullPolicy: "{{ .Values.pullPolicy }}"
       volumes:
 #        - name: filebeat-conf
 #          hostPath:
@@ -67,15 +67,15 @@ spec:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
       containers:
       - name: sdc-fe
+        image: "{{ .Values.image.sdcFrontend }}"
+        imagePullPolicy: "{{ .Values.pullPolicy }}"
         env:
         - name: ENVNAME
-          value: AUTO
+          value: "{{ .Values.env.name }}"
         - name: HOST_IP
           valueFrom:
             fieldRef:
               fieldPath: status.podIP
-        image: {{ .Values.image.sdcFrontend }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
         volumeMounts:
 #        - mountPath: /usr/share/elasticsearch/data/
 #          name: sdc-sdc-es-es
@@ -92,16 +92,16 @@ spec:
 #          name: sdc-fe-config
 #        - mountPath: /tmp/logback.xml
 #          name: sdc-logback
-        lifecycle:
-          postStart:
-            exec:
-              command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-fe/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
+#        lifecycle:
+#          postStart:
+#            exec:
+#              command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-fe/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
         ports:
         - containerPort: 9443
         - containerPort: 8181
         readinessProbe:
           tcpSocket:
             port: 8181
-          initialDelaySeconds: 5
+          initialDelaySeconds: 30
           periodSeconds: 10
 #{{ end }}