Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with the native sidecar container #12395

Closed
alpeb opened this issue Apr 5, 2024 · 0 comments · Fixed by #12453
Closed

Issues with the native sidecar container #12395

alpeb opened this issue Apr 5, 2024 · 0 comments · Fixed by #12453
Labels

Comments

@alpeb
Copy link
Member

alpeb commented Apr 5, 2024

When enabling the native sidecar container feature (proxy.nativeSidecar=true) for injecting the proxy, we've found the following list of problems, all caused by iterating over the workload's containers instead of iterating over its init containers when retrieving the proxy manifest:

Destination Controller

The Get API fails when the target has a port marked as opaque:

time="2024-04-05T13:45:05Z" level=error msg="Failed to translate Pod endpoints to weighted addr: failed to read inbound port: failed to find LINKERD2_PROXY_INBOUND_LISTEN_ADDR environment variable in any container for given pod spec" addr=":8086" component=endpoint-translator context-ns=emojivoto context-pod=vote-bot-8654bf8cf9-g8p7m remote="10.42.0.10:40964" service="web-svc.emojivoto.svc.cluster.local:80"

CLI

  • linkerd identity fails with:
failed to find linkerd-admin port in linkerd-proxy container for given pod spec
  • linkerd check fails at the step "linkerd-control-plane-proxy".
  • linkerd viz check fails at the check "linkerd-viz pods are injected".
  • linkerd version --proxy doesn't properly report versions
  • linkerd edges -o json is not displaying the pods identities
  • linkerd uninject fails to remove the proxy from workloads injected with the --manual option

Ref #12382

@olix0r olix0r added the bug label Apr 8, 2024
alpeb added a commit that referenced this issue Apr 17, 2024
Added the test `deep-native-sidecar` which runs the `deep` test with the
new flag `--native-sidecar`.

Also replaced the final `WaitRollout` call in `install_test.go` with a
`linkerd check` call, to also allow us verifying that command is working
as intended.

Note this won't pass CI until #12395 is addressed.
alpeb added a commit that referenced this issue Apr 26, 2024
Closes #12395

Failing to iterate over init containers as well as regular containers for finding the proxy in various parts of the code when the proxy is injected as a native sidecar resulted in:

- `Get` Destination API failing in the presence of opaque ports
- Failure having the injector detecting already injected pods
- Various CLI issues

This PR is split into the following commits addressing each issue separately:

a8ebe76 - Fix injection check for existing sidecars
44e9625 - Fix 'linkerd uninject'
6269496 - Fix 'linkerd version --proxy'
42dbdad - Fix 'linkerd identity'
39db823 - Fix 'linkerd check'
7359f37 - Fix 'linkerd dg proxy-metrics'
f8f73c4 - Fix destination controller
alpeb added a commit that referenced this issue Apr 26, 2024
Added the test `deep-native-sidecar` which runs the `deep` test with the
new flag `--native-sidecar`.

Also replaced the final `WaitRollout` call in `install_test.go` with a
`linkerd check` call, to also allow us verifying that command is working
as intended.

Note this won't pass CI until #12395 is addressed.
the-wondersmith pushed a commit to the-wondersmith/linkerd2 that referenced this issue Apr 27, 2024
Closes linkerd#12395

Failing to iterate over init containers as well as regular containers for finding the proxy in various parts of the code when the proxy is injected as a native sidecar resulted in:

- `Get` Destination API failing in the presence of opaque ports
- Failure having the injector detecting already injected pods
- Various CLI issues

This PR is split into the following commits addressing each issue separately:

a8ebe76 - Fix injection check for existing sidecars
44e9625 - Fix 'linkerd uninject'
6269496 - Fix 'linkerd version --proxy'
42dbdad - Fix 'linkerd identity'
39db823 - Fix 'linkerd check'
7359f37 - Fix 'linkerd dg proxy-metrics'
f8f73c4 - Fix destination controller

Signed-off-by: Mark S <[email protected]>
the-wondersmith pushed a commit to the-wondersmith/linkerd2 that referenced this issue Apr 29, 2024
Closes linkerd#12395

Failing to iterate over init containers as well as regular containers for finding the proxy in various parts of the code when the proxy is injected as a native sidecar resulted in:

- `Get` Destination API failing in the presence of opaque ports
- Failure having the injector detecting already injected pods
- Various CLI issues

This PR is split into the following commits addressing each issue separately:

a8ebe76 - Fix injection check for existing sidecars
44e9625 - Fix 'linkerd uninject'
6269496 - Fix 'linkerd version --proxy'
42dbdad - Fix 'linkerd identity'
39db823 - Fix 'linkerd check'
7359f37 - Fix 'linkerd dg proxy-metrics'
f8f73c4 - Fix destination controller

Signed-off-by: Mark S <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants