tumblr / k8s-sidecar-injector

Kubernetes sidecar injection service
Apache License 2.0
345 stars 75 forks source link

Default injection for all new containers? #38

Closed kandeshvari closed 4 years ago

kandeshvari commented 4 years ago

Does k8s-sidecar-injector has default injection support for all creating containers?

It would be convenient to add cluster-wide envs to all pods

byxorna commented 4 years ago

Hi @kandeshvari No, the sidecar injector does not support injection for all pods. You must explicitly tell the sidecar injector which configuration to use when launching a pod, by launching the pod with the appropriate annotation.

Internally, we have addressed this need by explicitly adding the annotation asking for cluster-wide env vars wherever they are needed.

kandeshvari commented 4 years ago

@byxorna thank you for answer. Looks like I'll use your solution.