I have scenario where I need to inject istio-side into the workload without labelling the namespace. Reason I can't label the namespace is because in my cluster the namespace are created via an automated process and currently I can't change that process due to security reason. Hence want to understand if there is a way to automatically inject the istio sidecar into the workload without labelling the namespace.
Resources I have already tried and tested.
Using the
sidecar.istio.io/inject="true"
annotation on the in the deployment/pod definition.Note: the annotation will only work with if the namespace is labelled and for this reason I really don't why do we even have this annotation. For more information please visit: https://github.com/istio/istio/issues/6476#issuecomment-1023817004
Manual injection works but it has way too much operational overhead and hence is not a preferred method.
DiscoverySelector construct as only works on namespaces not on deployment/pods object inside kubernetes.
Istio Version
client version: 1.12.2
control plane version: 1.12.1