Skip to content

Fill tsh kubectl version with the correct version details#32913

Merged
tigrato merged 1 commit intomasterfrom
tigrato/add-kubectl-version
Nov 21, 2023
Merged

Fill tsh kubectl version with the correct version details#32913
tigrato merged 1 commit intomasterfrom
tigrato/add-kubectl-version

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Oct 3, 2023

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).

Depends on https://github.com/gravitational/teleport.e/pull/2554

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

Comment thread Makefile Outdated
Comment thread build.assets/kubectl-version/main.go Outdated
Comment thread build.assets/kubectl-version/main.go Outdated
@tigrato tigrato force-pushed the tigrato/add-kubectl-version branch from 97e4734 to f25b010 Compare October 4, 2023 15:47
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 force-pushed the tigrato/add-kubectl-version branch from f25b010 to f00be67 Compare November 2, 2023 12:09
@tigrato tigrato requested a review from fheinecke November 2, 2023 12:11
@tigrato tigrato marked this pull request as ready for review November 2, 2023 12:11
@github-actions github-actions Bot requested review from nklaassen and rudream November 2, 2023 12:12
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 2, 2023

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from rudream November 16, 2023 18:48
@tigrato tigrato enabled auto-merge November 21, 2023 09:44
@tigrato tigrato added this pull request to the merge queue Nov 21, 2023
Merged via the queue into master with commit 0c48d50 Nov 21, 2023
@tigrato tigrato deleted the tigrato/add-kubectl-version branch November 21, 2023 10:04
@public-teleport-github-review-bot
Copy link
Copy Markdown

@tigrato See the table below for backport results.

Branch Result
branch/v13 Create PR
branch/v14 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants