You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Istio sidecar injection needs to be opt out rather than opt in #1300
area/networkingkind/featureWell-understood/specified features, ready for coding.trackingThis label is applied to Knative issues that track issues external to Knative (e.g. Istio, K8s)
Matt Moore: Can't we opt containers into sidecar injection instead of out of injection?
removing the namespace annotation makes the activator stop getting sidecard. I don't understand the logic of only having an opt-out per Pod
I think it would be good if we could get sidecar injection without requiring everything in the namespace to have it or opt out as well
policy=disabled --> The sidecar injector will not inject the sidecar into pods by default. Add the sidecar.istio.io/inject annotation with value true to the pod template spec to enable injection.
policy=enabled --> The sidecar injector will inject the sidecar into pods by default. Add the sidecar.istio.io/inject annotation with value false to the pod template spec to disable injection
I just deleted the annotation from config/100-namespace.yaml and brought our stuff up. The Activator was 1/1, so no sidecar. Would be good to get independent confirmation.
So ConfigMap chooses whether we are opt-in, or opt-out (by using the Pod annotation). The namespace label needs to be set to enabled for all namespaces that we want injection to happen.
Our ConfigMap is set to policy=enabled: which means that:
in namespaces that we disable injection: no injection will happen, ever.
in namespaces that we enable injection: injection will happen unless we opt-out at Pod level.
If we set ConfigMap to policy=disabled, then
in namespaces that we disable injection: no injection will happen, ever.
in namespaces that we enable injection: injection will not happen unless we opt-in at Pod level.
Currently we can't have both of these policy, since the setting is applied globally in the injector ConfigMap.
Installing the helm stable/concourse chart is unsuccessful until I target a namespace without istio sidecar injection. More annoyingly, it is not immediately obvious that this was the cause. I expect other helm charts will misbehave similarly.
area/networkingkind/featureWell-understood/specified features, ready for coding.trackingThis label is applied to Knative issues that track issues external to Knative (e.g. Istio, K8s)
Activity
tcnghia commentedon Jun 21, 2018
Per https://istio.io/docs/setup/kubernetes/sidecar-injection/#policy
policy=disabled --> The sidecar injector will not inject the sidecar into pods by default. Add the sidecar.istio.io/inject annotation with value true to the pod template spec to enable injection.
policy=enabled --> The sidecar injector will inject the sidecar into pods by default. Add the sidecar.istio.io/inject annotation with value false to the pod template spec to disable injection
@mattmoor
tcnghia commentedon Jun 21, 2018
So the annotation is to use for negating the default policy.
mattmoor commentedon Jun 21, 2018
I just deleted the annotation from
config/100-namespace.yamland brought our stuff up. The Activator was1/1, so no sidecar. Would be good to get independent confirmation.tcnghia commentedon Jun 21, 2018
I tried with this sample.yaml
It looks like the annotation is only effective when
policy=enabledand annotationsidecar.istio.io/inject=offtcnghia commentedon Jun 21, 2018
I contacted Istio team and they think this is a bug, I'll file one.
tcnghia commentedon Jun 21, 2018
Filed istio/istio#6476
tcnghia commentedon Jun 21, 2018
Summary of the current behavior
istio-injectionpolicysidecar.istio.io/injectSo ConfigMap chooses whether we are opt-in, or opt-out (by using the Pod annotation). The namespace label needs to be set to enabled for all namespaces that we want injection to happen.
Our ConfigMap is set to
policy=enabled: which means that:If we set ConfigMap to
policy=disabled, thenCurrently we can't have both of these policy, since the setting is applied globally in the injector ConfigMap.
tcnghia commentedon Jun 27, 2018
This is being changed in istio/istio#6439, probably will release in 1.0
jchesterpivotal commentedon Jul 2, 2018
Stumbled across this while working on knative/build#216.
Installing the helm stable/concourse chart is unsuccessful until I target a namespace without istio sidecar injection. More annoyingly, it is not immediately obvious that this was the cause. I expect other helm charts will misbehave similarly.
Istio inject ClusterBus pods (#205)
Opt-in to istio sidecar injection
Opt-in to istio sidecar injection (#312)
Opt-in to istio sidecar injection (knative#312)
Merge pull request knative#1300 from openshift-knative/konflux/refere…