From d4b45daa15eea3b4ea4665f5536b074fe7abbda4 Mon Sep 17 00:00:00 2001 From: Zac Bergquist Date: Wed, 1 Jan 2025 14:09:24 -0700 Subject: [PATCH] Update the helm command in the tctl tokens add output This ensures that the advice tctl prints will work with the current version of the Teleport cluster. Closes #50317 --- tool/tctl/common/kube_command.go | 7 ++++--- tool/tctl/common/token_command.go | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tool/tctl/common/kube_command.go b/tool/tctl/common/kube_command.go index cc00aed3ac8d7..12a9ce9d08f9c 100644 --- a/tool/tctl/common/kube_command.go +++ b/tool/tctl/common/kube_command.go @@ -128,10 +128,11 @@ helm repo update --set proxyAddr={{.auth_server}} \ --set authToken={{.token}} \ --create-namespace \ - --namespace=teleport-agent - + --namespace=teleport-agent \ + --version={{.version}} + Please note: - + - This invitation token will expire in {{.minutes}} minutes. - {{.auth_server}} must be reachable from Kubernetes cluster. - The token is usable in a standalone Linux server with kubernetes_service. diff --git a/tool/tctl/common/token_command.go b/tool/tctl/common/token_command.go index c11a64ce070cc..27e400602b92e 100644 --- a/tool/tctl/common/token_command.go +++ b/tool/tctl/common/token_command.go @@ -275,6 +275,7 @@ func (c *TokensCommand) Add(ctx context.Context, client *authclient.Client) erro "token": token, "minutes": c.ttl.Minutes(), "set_roles": setRoles, + "version": proxies[0].GetTeleportVersion(), }) case roles.Include(types.RoleApp): proxies, err := client.GetProxies()