Skip to content

[v13] Fill tsh kubectl version with the correct version details#34826

Merged
tigrato merged 1 commit intobranch/v13from
bot/backport-32913-branch/v13
Nov 22, 2023
Merged

[v13] Fill tsh kubectl version with the correct version details#34826
tigrato merged 1 commit intobranch/v13from
bot/backport-32913-branch/v13

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Nov 21, 2023

Backport #32913 to branch/v13

Changelog: Override the version of tsh kubectl with the upstream kubectl version used.

This PR fixes the version reported by `tsh kubectl version` at compile time.
Currently, the package reports:

`v0.0.0-master+$Format:%H$`

The version is derived from the `k8s.io/kubectl` version we import in Teleport main repo where we replace the `v0` with `v1` to follow `kubectl` versions.

Unfortunately, k8s.io packages don't expose an api where we can replace the version at runtime (they have something that allows replacing the Git commit but the semantic part must not change).

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@tigrato tigrato added this pull request to the merge queue Nov 22, 2023
Merged via the queue into branch/v13 with commit 15cfedc Nov 22, 2023
@tigrato tigrato deleted the bot/backport-32913-branch/v13 branch November 22, 2023 17:47
@camscale camscale mentioned this pull request Dec 13, 2023
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