linkerd2/controller
Alejandro Pedraza 8afe36e6e9
Fix jaeger injector interfering with upgrades to 2.12.0 (#9429)
Fixes issue described in [this comment](https://github.com/linkerd/linkerd2/issues/9310#issuecomment-1247201646)
Rollback #7382

Should be cherry-picked back into 2.12.1

For 2.12.0, #7382 removed the env vars `_l5d_ns` and `_l5d_trustdomain` from the proxy manifest because they were no longer used anywhere. In particular, the jaeger injector used them when injecting the env var `LINKERD2_PROXY_TAP_SVC_NAME=tap.linkerd-viz.serviceaccount.identity.$(_l5d_ns).$(_l5d_trustdomain)` but then started using values.yaml entries instead of these env vars.

The problem is when upgrading the core control plane (or anything else) to 2.12.0, the 2.11 jaeger extension will still be running and will attempt to inject the old env var into the pods, making reference to `l5d_ns` and `_l5d_trustdomain` which the new proxy container won't offer anymore. This will put the pod in an error state.

This change restores back those env vars. We will be able to remove them at last in 2.13.0, when presumably the jaeger injector would already have already been upgraded to 2.12 by the user.

Replication steps:
```bash
$ curl -sL https://run.linkerd.io/install | LINKERD2_VERSION=stable-2.11.4 sh
$ linkerd install | k apply -f -
$ linkerd jaeger install | k apply -f -
$ linkerd check
$ curl -sL https://run.linkerd.io/install | LINKERD2_VERSION=stable-2.12.0 sh
$ linkerd upgrade --crds | k apply -f -
$ linkerd upgrade | k apply -f -
$ k get po -n linkerd
NAME                                      READY   STATUS               RESTARTS     AGE
linkerd-identity-58544dfd8-jbgkb          2/2     Running              0            2m19s
linkerd-destination-764bf6785b-v8cj6      4/4     Running              0            2m19s
linkerd-proxy-injector-6d4b8c9689-zvxv2   2/2     Running              0            2m19s
linkerd-identity-55bfbf9cd4-4xk9g         0/2     CrashLoopBackOff     1 (5s ago)   32s
linkerd-proxy-injector-5b67589678-mtklx   0/2     CrashLoopBackOff     1 (5s ago)   32s
linkerd-destination-ff9b5f67b-jw8w5       0/4     PostStartHookError   0 (8s ago)   32s
```
2022-09-20 10:41:34 -07:00
..
api Add `--destination-pod flag` to `linkerd diagnostics endpoints` subcommand (#9200) 2022-08-18 15:37:29 -06:00
cmd Remove needless RBAC on the identity controller (#9368) 2022-09-13 12:36:14 -07:00
gen Fix policy API json mapping (#9329) 2022-09-12 08:07:36 -07:00
heartbeat Use go-test/deep for comparisons in tests (#8427) 2022-05-05 09:31:07 -07:00
identity core: use serviceAccountToken volume for pod authentication (#7117) 2021-11-03 02:03:39 +05:30
k8s Modify k8s client to use admissionregistration/v1 (#9401) 2022-09-20 09:44:18 -07:00
proxy-injector Fix jaeger injector interfering with upgrades to 2.12.0 (#9429) 2022-09-20 10:41:34 -07:00
script Enable gocritic linting (#7906) 2022-02-17 22:45:25 +00:00
sp-validator Fix sp-validator not setting requestUID (#5866) 2021-03-04 09:57:57 -08:00
webhook controller: Increase HTTP ReadHeaderTimeout to 15s (#9272) 2022-08-26 13:33:38 -07:00
Dockerfile Update Go to 1.18 (#9019) 2022-07-27 16:10:39 -07:00