Skip to content

[v12] Fix Kubernetes Legacy Proxy heartbeats#29737

Merged
tigrato merged 1 commit intobranch/v12from
tigrato/backport-29733-v12
Jul 28, 2023
Merged

[v12] Fix Kubernetes Legacy Proxy heartbeats#29737
tigrato merged 1 commit intobranch/v12from
tigrato/backport-29733-v12

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Jul 28, 2023

Backport of #29733 to branch/v12

This PR is slightly different than the one merged into master because branch/v12 and branch/v11 still support the KubeService objects and they have a different name {hostID}-proxy_service

When a Teleport Kubernetes Proxy runs in legacy mode - i.e. - spec enables `proxy_service.kubernetes.enabled`, the proxy is capable of proxy requests to a target Kubernetes cluster instead of forwarding them to a Teleport Kubernetes Service.

The following config enables the legacy proxy mode in proxy:

```yaml
proxy_service:
    enabled: yes
    web_listen_addr: 0.0.0.0:3080
    public_addr: tele.local:3080
    kubernetes:
      enabled: yes
      listen_addr: 0.0.0.0:3026
      kubeconfig_file: path # optional
```

Because the proxy forwards and heartbeat the configured Kube clusters, it needs permissions to upsert the kube cluster in auth's backend and to extend its expiration date.

This PR fixes a problem introduced in Teleport 8 where the proxy is allowed to upsert the kube server, but it's not allowed to extend the expiration time.

When the request fails, the proxy becomes degraded and the performance is affected.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@tigrato tigrato force-pushed the tigrato/backport-29733-v12 branch from 949d441 to a75a4d7 Compare July 28, 2023 16:54
@tigrato tigrato enabled auto-merge July 28, 2023 16:54
@tigrato tigrato added this pull request to the merge queue Jul 28, 2023
Merged via the queue into branch/v12 with commit 8196024 Jul 28, 2023
@tigrato tigrato deleted the tigrato/backport-29733-v12 branch July 28, 2023 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants