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
[v13] make tsh match against discovered db name #32092
Merged
GavinFrazar
merged 1 commit into
gavinfrazar/v13-correct-selected-cluster
from
gavinfrazar/v13-tsh-match-against-discovered-name
Sep 19, 2023
Merged
[v13] make tsh match against discovered db name #32092
GavinFrazar
merged 1 commit into
gavinfrazar/v13-correct-selected-cluster
from
gavinfrazar/v13-tsh-match-against-discovered-name
Sep 19, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
size/md
tsh
tsh - Teleport's command line tool for logging into nodes running Teleport.
labels
Sep 18, 2023
AntonAM
approved these changes
Sep 18, 2023
GavinFrazar
force-pushed
the
gavinfrazar/v13-tsh-match-against-discovered-kube-name
branch
from
September 19, 2023 00:12
a72b947
to
e656792
Compare
GavinFrazar
force-pushed
the
gavinfrazar/v13-tsh-match-against-discovered-name
branch
from
September 19, 2023 00:13
02e488d
to
4872575
Compare
jakule
approved these changes
Sep 19, 2023
public-teleport-github-review-bot
bot
removed request for
mdwn and
smallinsky
September 19, 2023 00:49
GavinFrazar
force-pushed
the
gavinfrazar/v13-tsh-match-against-discovered-kube-name
branch
from
September 19, 2023 00:57
e656792
to
7304a08
Compare
Base automatically changed from
gavinfrazar/v13-tsh-match-against-discovered-kube-name
to
gavinfrazar/v13-correct-selected-cluster
September 19, 2023 00:57
backports #31689 to branch/v13. * disallow prefix matching * select by exact name match first, * otherwise look for unambiguous discovered name label match. * look for an active db to resolve discovered name match ambiguity. * add more predicate builder helpers * check for db name in not found error for stale cert hint * no error status on tsh db logout with no logged in dbs * remove dead code * refactor helper funcs to simplify code and make it easier to test * test complex database selection * test findActiveDatabase * test choosing one db by discovered name * add more resource selectors tests * test formatDatabaseLoginCommand * add debug logging for db selection
GavinFrazar
force-pushed
the
gavinfrazar/v13-tsh-match-against-discovered-name
branch
from
September 19, 2023 00:57
4872575
to
0e5619a
Compare
GavinFrazar
merged commit Sep 19, 2023
8b3a123
into
gavinfrazar/v13-correct-selected-cluster
18 checks passed
GavinFrazar
deleted the
gavinfrazar/v13-tsh-match-against-discovered-name
branch
September 19, 2023 00:58
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 19, 2023
* [v13] Fix Kubernetes selected cluster backports #30167 to branch/v13. * Fix Kubernetes selected cluster Kubeconfig context name can be customized using `--set-context-name` flag. When using it, the selected Kubernetes cluster fails to correctly identify the cluster name. * [v13] tsh kube login by prefix, query, labels (#32088) backports #30252 to branch/v13. * fetch kube clusters once for login * [v13] update `tsh proxy kube` cluster selection ux (#32089) backports #30478 to branch/v13. * select by labels, query predicate, name, and/or prefix of name. * fix --cluster flag not being propagated * [v13] simplify tsh db prefix predicate logic (#32090) backports #30531 to branch/v13. * [v13] check for discovered kube cluster name exact match (#32091) backports #31744 to branch/v13. * [v13] rework tsh database selection logic (#32092) backports #31689 to branch/v13. * disallow prefix matching * select by exact name match first, * otherwise look for unambiguous discovered name label match. * look for an active db to resolve discovered name match ambiguity. * add more predicate builder helpers * check for db name in not found error for stale cert hint * no error status on tsh db logout with no logged in dbs * remove dead code * refactor helper funcs to simplify code and make it easier to test * test complex database selection * test findActiveDatabase * test choosing one db by discovered name * add more resource selectors tests * test formatDatabaseLoginCommand * add debug logging for db selection * [v13] Fix `tsh kube login` when creds are expired or doesn't exist (#32095) Backports #31418 to branch/v13. This PR uses `client.RetryWithRelogin` helper to deal with cases where user's credentials don't exist or are already expired. Co-authored-by: Tiago Silva <tiago.silva@goteleport.com> * remove tsh kube prefix matching (#31852) (#32097) * fix retry with relogin for ambiguous clusters * consolidate test setup for login/proxy kube selection tests * add more test cases for kube selection * remove prefix testing * add origin cloud label in tests * refactor the check for multiple cluster login into a func * [v13] remove prefix matching in tctl (#32104) Backports #31916 to branch/v13. * remove prefix matching in tctl * replace prefix matching with exact discovered name match as a fallback when no resource full name matches the name given by a user * refactor test helpers * avoid decoding yaml/json into already initialized var --------- Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
backports #31689 to branch/v13.
stacked on #32091