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

context can be 1 or bigger #636

Merged
merged 6 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ jobs:
echo "********************************************************************************"
echo "Running kubecm switch..."
echo "********************************************************************************"
bin/kubecm s 3rd-kind
bin/kubecm s kind-3rd-kind
echo "********************************************************************************"
echo "Running kubecm delete..."
echo "********************************************************************************"
bin/kubecm d kind-kind
echo "********************************************************************************"
echo "Running kubecm global flag --config..."
echo "********************************************************************************"
bin/kubecm s 3rd-kind --config merge.config
bin/kubecm s kind-3rd-kind --config merge.config
bin/kubecm list --config merge.config
2 changes: 1 addition & 1 deletion cmd/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (kc *KubeConfigOption) handleContexts(oldConfig *clientcmdapi.Config) (*cli
if len(kc.config.Contexts) > 1 {
newName = fmt.Sprintf("%s-%s", kc.fileName, HashSufString(name))
} else {
newName = kc.fileName
newName = name
}
if checkContextName(newName, oldConfig) {
nameConfirm := BoolUI(fmt.Sprintf("「%s」 Name already exists, do you want to rename it. (If you select `False`, this context will not be merged)", newName))
Expand Down