website icon indicating copy to clipboard operation
website copied to clipboard

Update documentation to be clearer about where to add auto injection annotations

Open charlie-hadden opened this issue 5 years ago • 1 comments

When I was setting linkerd2 up for the first time I added my inkerd.io/inject: enabled annotation to the deployment, and I was seeing the injector skipping it. After discussing on slack I was pointed in the right direction and moved it pod template where things worked correctly.

However, the documentation in a couple of places seems to suggest that my original way would have worked correctly. The wording which was throwing me off was:

Linkerd automatically adds the data plane proxy to pods when the linkerd.io/inject: enabled annotation is present on a namespace, deployment, or pod.

from here: https://linkerd.io/2/features/proxy-injection/

This is typically done by annotating the namespace, deployment, or pod with the linkerd.io/inject: enabled Kubernetes annotation, which will trigger automatic proxy injection when the resources are created.

from here: https://linkerd.io/2/tasks/adding-your-service/

charlie-hadden avatar Aug 14 '19 17:08 charlie-hadden

Also now that linkerd/linkerd2#3194 has merged, we should point out that these annotations are also available at the namespace level

alpeb avatar Aug 15 '19 19:08 alpeb