Open m15o opened 4 months ago
Describe the bug restartPolicy: Always is dropped from initContainer.
restartPolicy: Always
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
Steps to reproduce
Apply following deployment:
apiVersion: apps/v1 kind: Deployment metadata: name: appmesh-test labels: component: appmesh-test spec: replicas: 1 selector: matchLabels: component: appmesh-test template: metadata: labels: component: appmesh-test spec: containers: - name: main image: debian:stable-slim command: ["/bin/bash"] args: - -c - | echo [main] started trap 'echo [main] finished' EXIT while true; do echo [main] sleep; sleep 1; done initContainers: - name: init image: debian:stable-slim command: ["/bin/bash"] args: - -c - | echo [init] started trap 'echo [init] finished' EXIT while true; do echo [init] sleep; sleep 1; done restartPolicy: Always enableServiceLinks: false
Only init container runs, and the pod never become ready.
init
Expected outcome
init container and main container run concurrently.
main
Environment
Additional Context:
Describe the bug
restartPolicy: Always
is dropped from initContainer.https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
Steps to reproduce
Apply following deployment:
Only
init
container runs, and the pod never become ready.Expected outcome
init
container andmain
container run concurrently.Environment
Additional Context: