Skip to content

Cannot create sidecar containers #774

Description

@m15o

Describe the bug
restartPolicy: Always is dropped from initContainer.

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.

Expected outcome

init container and main container run concurrently.

Environment

  • App Mesh controller version: 1.12.7
  • Envoy version
  • Are you using any integrations: no
  • Kubernetes version: 1.29.3
  • Using EKS (yes/no), if so version?: v1.29.3-eks-adc7111

Additional Context:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions