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

connect: redirect-traffic command should pass ACL token when ACL are enabled #576

Merged
merged 1 commit into from
Jul 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions connect-inject/container_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ consul-k8s connect-init -pod-name=${POD_NAME} -pod-namespace=${POD_NAMESPACE} \

# Apply traffic redirection rules.
/consul/connect-inject/consul connect redirect-traffic \
{{- if .AuthMethod }}
-token-file="/consul/connect-inject/acl-token" \
{{- end }}
{{- if .ConsulNamespace }}
-namespace="{{ .ConsulNamespace }}" \
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions connect-inject/container_init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ consul-k8s connect-init -pod-name=${POD_NAME} -pod-namespace=${POD_NAMESPACE} \

# Apply traffic redirection rules.
/consul/connect-inject/consul connect redirect-traffic \
-token-file="/consul/connect-inject/acl-token" \
-namespace="k8snamespace" \
-proxy-id="$(cat /consul/connect-inject/proxyid)" \
-proxy-uid=5995`,
Expand Down