Skip to content

Commit 8c3b26f

Browse files
authored
Update the helm command in the tctl tokens add output (#50695)
This ensures that the advice tctl prints will work with the current version of the Teleport cluster. Closes #50317
1 parent e594067 commit 8c3b26f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tool/tctl/common/kube_command.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,11 @@ helm repo update
128128
--set proxyAddr={{.auth_server}} \
129129
--set authToken={{.token}} \
130130
--create-namespace \
131-
--namespace=teleport-agent
132-
131+
--namespace=teleport-agent \
132+
--version={{.version}}
133+
133134
Please note:
134-
135+
135136
- This invitation token will expire in {{.minutes}} minutes.
136137
- {{.auth_server}} must be reachable from Kubernetes cluster.
137138
- The token is usable in a standalone Linux server with kubernetes_service.

tool/tctl/common/token_command.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ func (c *TokensCommand) Add(ctx context.Context, client *authclient.Client) erro
275275
"token": token,
276276
"minutes": c.ttl.Minutes(),
277277
"set_roles": setRoles,
278+
"version": proxies[0].GetTeleportVersion(),
278279
})
279280
case roles.Include(types.RoleApp):
280281
proxies, err := client.GetProxies()

0 commit comments

Comments
 (0)