Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v11] Backport #21289 & #21885 #21919

Merged
merged 6 commits into from
Feb 20, 2023
Merged

Conversation

tigrato
Copy link
Contributor

@tigrato tigrato commented Feb 16, 2023

Backport #21289 and #21885 to branch/v11

* Change formatting for "/version" endpoint

This PR changes the formatting for "/version" endpoint since Kubernetes
clients do not expect a JSON response on that endpoint.
This PR returns the error message directly into the body without any
formatting so that `kubectl` is able to present the desired error.

```
kubectl version --short
Flag --short has been deprecated, and will be removed in the future. The --short output will become the default.
Client Version: v1.25.4
Kustomize Version: v4.5.7
Error from server (InternalError): an error on the server ("this user cannot request kubernetes access, has no assigned groups or users") has prevented the request from succeeding
```

Fixes #20900

* change message wording

* add validation when generating kube creds

* fix typo
This PR resolves the comments pointed out by @jakule during the review
of #21846.
@github-actions github-actions bot added backport kubernetes-access size/md tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Feb 16, 2023
@tigrato tigrato enabled auto-merge (squash) February 16, 2023 15:56
@tigrato tigrato merged commit ebd2748 into branch/v11 Feb 20, 2023
@github-actions github-actions bot deleted the bot/backport-21885-branch/v11 branch February 20, 2023 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport kubernetes-access size/md tsh tsh - Teleport's command line tool for logging into nodes running Teleport.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants