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

Fix proxy protocol support for Kube access flow #29268

Merged
merged 1 commit into from
Jul 18, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/kube/proxy/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ type TLSServerConfig struct {
// kubernetes_service. The servers are kept in memory to avoid making unnecessary
// unmarshal calls followed by filtering and to improve memory usage.
KubernetesServersWatcher *services.KubeServerWatcher
// EnableProxyProtocol enables proxy protocol support
EnableProxyProtocol bool
}

// CheckAndSetDefaults checks and sets default values
Expand Down Expand Up @@ -272,7 +274,7 @@ func (t *TLSServer) Serve(listener net.Listener) error {
Context: t.Context,
Listener: listener,
Clock: t.Clock,
EnableExternalProxyProtocol: true,
EnableExternalProxyProtocol: t.EnableProxyProtocol,
ID: t.Component,
CertAuthorityGetter: caGetter,
LocalClusterName: t.ClusterName,
Expand Down
1 change: 1 addition & 0 deletions lib/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -4214,6 +4214,7 @@ func (process *TeleportProcess) initProxyEndpoint(conn *Connector) error {
Log: log,
IngressReporter: ingressReporter,
KubernetesServersWatcher: kubeServerWatcher,
EnableProxyProtocol: cfg.Proxy.EnableProxyProtocol,
})
if err != nil {
return trace.Wrap(err)
Expand Down