Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- containers:
- - name: main
- image: gcr.io/some/image:latest
- command: ["/bin/bash", "-c"]
- args:
- - |
- trap "touch /tmp/pod/main-terminated" EXIT
- /my-batch-job/bin/main --config=/config/my-job-config.yaml
- volumeMounts:
- - mountPath: /tmp/pod
- name: tmp-pod
- - name: envoy
- image: gcr.io/our-envoy-plus-bash-image:latest
- command: ["/bin/bash", "-c"]
- args:
- - |
- /usr/local/bin/envoy --config-path=/my-batch-job/etc/envoy.json &
- CHILD_PID=$!
- (while true; do if [[ -f "/tmp/pod/main-terminated" ]]; then kill $CHILD_PID; fi; sleep 1; done) &
- wait $CHILD_PID
- if [[ -f "/tmp/pod/main-terminated" ]]; then exit 0; fi
- volumeMounts:
- - mountPath: /tmp/pod
- name: tmp-pod
- readOnly: true
- volumes:
- - name: tmp-pod
- emptyDir: {}
Add Comment
Please, Sign In to add comment