linkerd2/bin
Alejandro Pedraza 6fb35b0af7
Jaeger injector mutating webhook (#5276)
* Jaeger injector mutating webhook

Closes #5231. This is based off of the `alex/sep-tracing` branch.

This webhook injects the `LINKERD2_PROXY_TRACE_COLLECTOR_SVC_ADDR`,
`LINKERD2_PROXY_TRACE_COLLECTOR_SVC_NAME` and
`LINKERD2_PROXY_TRACE_ATTRIBUTES_PATH` environment vars into the proxy
spec when a pod is created, as well as the podinfo volume and its mount.
If any of these are found to be present already in the pod spec, it
exits without applying a patch.

The `values.yaml` file has been expanded to include config for this
webhook. In particular, one can define a `namespaceSelector` and/or a
`objectSelector` to filter which pods will this webhook act on.

The config entries in `values.yam` for `collectorSvcAddr` and
`collectorSvcAccount` can be overriden with the
`config.linkerd.io/trace-collector` and
`config.alpha.linkerd.io/trace-collector-service-account` annotation at
the namespace or pod spec level.

## How to test:
```bash
docker build . -t ghcr.io/linkerd/jaeger-webhook:0.0.1 -f
jaeger/proxy-mutator/Dockerfile
k3d image import ghcr.io/linkerd/jaeger-webhook:0.0.1
bin/helm-build
linkerd install
helm install jaeger jaeger/charts/jaeger
linkerd inject https://run.linkerd.io/emojivoto.yml | kubectl apply -f -
kubectl -n emojivoto get po -l app=emoji-svc -oyaml | grep -A1 TRACE
```

## Reinvocation policy
The webhookconfig resource is configured with `reinvocationPolicy:
IfNeeded` so that if the tracing injector gets triggered before the
proxy injector, it will get triggered a second time after the proxy
injector runs so it can act on the injected proxy. By default this won't
be necessary because the webhooks run in alphabetical order (this is not
documented in k8s docs though) so
`linkerd-proxy-injector-webhook-config` will run before
`linkerd-proxy-mutator-webhook-config`. In order to test the
reinvocation mechanism, you can change the name of the former so it gets
called first.

I versioned the webhook image as `0.0.1`, but we can decide to align
that with linkerd's main version tag.
2020-11-27 12:25:28 -05:00
..
win Update CI and docs to reference `main` branch (#4662) 2020-06-24 12:39:22 -07:00
_docker.sh Don't skip pushing images if tag is already there (#5128) 2020-10-23 13:13:42 -05:00
_log.sh Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
_os.sh Created ./bin/_os.sh lib for os-arch detection (#4880) 2020-08-14 09:59:52 -05:00
_release.sh Fix spelling mistakes using codespell (#4700) 2020-07-07 17:07:22 -05:00
_tag.sh Migrate CI to docker buildx and other improvements (#4765) 2020-07-22 14:27:45 -05:00
_test-helpers.sh Consolidate integration tests under k3d (#5245) 2020-11-18 14:33:16 -05:00
build-cli-bin extension: Add new jaeger binary (#5278) 2020-11-25 20:10:35 +05:30
certs-openssl Ability for int tests to use external certs generated with openssl (#4997) 2020-09-25 11:25:29 -05:00
create-release-tag Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
docker Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
docker-build Jaeger injector mutating webhook (#5276) 2020-11-27 12:25:28 -05:00
docker-build-cli-bin Update BUILD.md with multiarch stuff and some extras (#5199) 2020-11-12 09:36:54 -05:00
docker-build-cni-plugin CI: Remove Base image (#4782) 2020-07-23 17:00:12 -05:00
docker-build-controller Migrate CI to docker buildx and other improvements (#4765) 2020-07-22 14:27:45 -05:00
docker-build-debug CI: Remove Base image (#4782) 2020-07-23 17:00:12 -05:00
docker-build-grafana Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
docker-build-jaeger-webhook Jaeger injector mutating webhook (#5276) 2020-11-27 12:25:28 -05:00
docker-build-proxy Migrate CI to docker buildx and other improvements (#4765) 2020-07-22 14:27:45 -05:00
docker-build-web Migrate CI to docker buildx and other improvements (#4765) 2020-07-22 14:27:45 -05:00
docker-cache-prune Migrate CI to docker buildx and other improvements (#4765) 2020-07-22 14:27:45 -05:00
docker-images Migrate CI to docker buildx and other improvements (#4765) 2020-07-22 14:27:45 -05:00
docker-pull Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
docker-pull-binaries Release ARM CLI artifacts (#4841) 2020-08-11 09:25:58 -05:00
docker-push Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
docker-retag-all Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
docker-test-proxy Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
fetch-proxy Build ARM docker images (#4794) 2020-08-05 11:14:01 -07:00
fmt Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
git-commit-proxy-version Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
go-run go-run: Move temporary binary into `target` directory (#4657) 2020-06-23 15:55:34 -07:00
goimports Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
helm Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
helm-build Jaeger injector mutating webhook (#5276) 2020-11-27 12:25:28 -05:00
image-load Jaeger injector mutating webhook (#5276) 2020-11-27 12:25:28 -05:00
install-deps Build ARM docker images (#4794) 2020-08-05 11:14:01 -07:00
install-pr Consolidate integration tests under k3d (#5245) 2020-11-18 14:33:16 -05:00
k3d Add support for k3d in integration tests (#4994) 2020-09-25 16:33:17 -05:00
kind Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
kubectl Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
linkerd Created ./bin/_os.sh lib for os-arch detection (#4880) 2020-08-14 09:59:52 -05:00
lint Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
markdownlint Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
markdownlint-all Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
minikube-start-hyperv.bat Introducing Conduit, the ultralight service mesh 2017-12-05 00:24:55 +00:00
mkube Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
protoc Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
protoc-diff Diff generated code from proto files (#4863) 2020-08-18 11:44:33 +03:00
protoc-go.sh Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
root-tag Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
shellcheck Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
shellcheck-all Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
test-cleanup Delete multicluster resources in `bin/test-cleanup` (#4983) 2020-09-18 07:38:46 -05:00
test-clouds Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
test-clouds-cleanup Improve shellscript portability by using /bin/env (#4628) 2020-06-19 15:49:29 -04:00
test-scale Fix spelling mistakes using codespell (#4700) 2020-07-07 17:07:22 -05:00
tests Consolidate integration tests under k3d (#5245) 2020-11-18 14:33:16 -05:00
update-codegen.sh Bump k8s client-go to v0.19.2 (#5002) 2020-09-28 12:45:18 -05:00
web Add i18n library to Linkerd dashboard (#4803) 2020-07-30 09:09:59 -07:00