Skip to content

Commit

Permalink
Disable konnectivity agent control plane proxy if not used
Browse files Browse the repository at this point in the history
The control plane proxy provided by konnectivity agent is only used if
k0s is running in tunneled networking mode. The konnectivity agent
starts it by default. Explicitly disable konnectivity's
NodeToMasterTraffic feature gate if not using tunneled networking mode,
so that the unused proxy isn't launched in that case.

Signed-off-by: Tom Wieczorek <[email protected]>
  • Loading branch information
twz123 committed Dec 19, 2022
1 parent a6b8efd commit 5c89685
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/component/controller/konnectivity.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,9 @@ spec:
priorityClassName: system-cluster-critical
tolerations:
- operator: Exists
{{ if .TunneledNetworkingMode }}
{{- if .TunneledNetworkingMode }}
hostNetwork: true
{{ end }}
{{- end }}
containers:
- image: {{ .Image }}
imagePullPolicy: {{ .PullPolicy }}
Expand All @@ -387,11 +387,13 @@ spec:
"--service-account-token-path=/var/run/secrets/tokens/konnectivity-agent-token",
"--agent-identifiers=host=$(NODE_IP)",
"--agent-id=$(NODE_IP)",
{{ if .TunneledNetworkingMode }}
{{- if .TunneledNetworkingMode }}
# agent need to listen on the node ip to be on pair with the tunneled network reconciler
"--bind-address=$(NODE_IP)",
"--apiserver-port-mapping=6443:localhost:{{.KASPort}}"
{{ end }}
{{- else }}
"--feature-gates=NodeToMasterTraffic=false"
{{- end }}
]
volumeMounts:
- mountPath: /var/run/secrets/tokens
Expand Down

0 comments on commit 5c89685

Please sign in to comment.