added filebeat to all components
[oom.git] / kubernetes / policy / templates / dep-pdp.yaml
index 6ba2a33..841d55c 100644 (file)
@@ -72,7 +72,7 @@ spec:
         lifecycle:
           postStart:
             exec:
-              command: ["/bin/sh", "-c", "sleep 60; cp -f /tmp/logback.xml /opt/app/policy/servers/pdp/webapps/pdp/WEB-INF/classes/logback.xml"]
+              command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/opt/app/policy/servers/pdp/webapps/pdp/WEB-INF/classes/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
       - image: {{ .Values.image.filebeat }}
         imagePullPolicy: {{ .Values.pullPolicy }}
         name: filebeat-onap