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

feat(kuma-cp) exclude traffic interceptions on port using annotations #1046

Merged
merged 2 commits into from
Oct 2, 2020

Conversation

jakubdyszkiewicz
Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz commented Oct 1, 2020

Summary

This PR introduces annotations to exclude specified ports from being intercepted by Envoy

traffic.kuma.io/exclude-inbound-ports annotation
traffic.kuma.io/exclude-outbound-ports annotation

Additionally, there is an option to apply this globally with

KUMA_RUNTIME_KUBERNETES_SIDECAR_TRAFFIC_EXCLUDE_INBOUND_PORTS
KUMA_RUNTIME_KUBERNETES_SIDECAR_TRAFFIC_EXCLUDE_OUTBOUND_PORTS

Because overriding individual config settings was not possible on K8S I introduced

controlPlane:
  envVar:
    KUMA_RUNTIME_KUBERNETES_SIDECAR_TRAFFIC_EXCLUDE_INBOUND_PORTS: 1234

in HELM

and

--env-var KUMA_RUNTIME_KUBERNETES_SIDECAR_TRAFFIC_EXCLUDE_INBOUND_PORTS=1234

in kumactl install

When you apply global configuration, we automatically add annotation to Pod but only if the annotation is not defined, so the user can override global behavior.

Documentation

Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
@jakubdyszkiewicz jakubdyszkiewicz requested a review from a team as a code owner October 1, 2020 14:16
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Copy link
Contributor

@nickolaev nickolaev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one remark from me.

app/kumactl/cmd/install/render_helm_files.go Show resolved Hide resolved
@jakubdyszkiewicz jakubdyszkiewicz merged commit 4e80c80 into master Oct 2, 2020
@jakubdyszkiewicz jakubdyszkiewicz deleted the feat/exclude-ports branch October 2, 2020 13:46
nickolaev pushed a commit that referenced this pull request Oct 2, 2020
…#1046)

Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
# Conflicts:
#	app/kumactl/cmd/completion/testdata/bash.golden
#	app/kumactl/cmd/completion/testdata/zsh.golden
#	app/kumactl/cmd/install/install_control_plane.go
#	app/kumactl/cmd/install/render_helm_files.go
#	app/kumactl/pkg/install/k8s/control-plane/helmtemplates_vfsdata.go
#	deployments/charts/kuma/README.md
#	deployments/charts/kuma/templates/cp-deployment.yaml
#	deployments/charts/kuma/values.yaml
#	docs/cmd/kumactl/HELP.md
#	pkg/api-server/config_ws_test.go
#	pkg/config/app/kuma-cp/kuma-cp.defaults.yaml
#	pkg/config/loader_test.go
#	pkg/config/plugins/runtime/k8s/config.go
#	pkg/plugins/runtime/k8s/controllers/namespace_controller_test.go
#	pkg/plugins/runtime/k8s/metadata/annotations.go
#	pkg/plugins/runtime/k8s/webhooks/injector/injector.go
#	pkg/plugins/runtime/k8s/webhooks/injector/injector_test.go
#	pkg/plugins/runtime/k8s/webhooks/injector/testdata/inject.14.golden.yaml
#	pkg/plugins/runtime/k8s/webhooks/injector/testdata/inject.15.golden.yaml
#	pkg/plugins/runtime/k8s/webhooks/injector/testdata/inject.16.golden.yaml

Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
nickolaev pushed a commit that referenced this pull request Oct 5, 2020
…#1046)

Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>

Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
nickolaev pushed a commit that referenced this pull request Oct 5, 2020
…#1046)

Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>

Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants