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

kubecm uses wrong user and cluster name #351

Closed
thesn10 opened this issue May 24, 2022 · 5 comments · Fixed by #536
Closed

kubecm uses wrong user and cluster name #351

thesn10 opened this issue May 24, 2022 · 5 comments · Fixed by #536
Assignees
Labels
question Further information is requested

Comments

@thesn10
Copy link

thesn10 commented May 24, 2022

kube cm adds the cluster with wrong cluster name and wrong user name:

image

kubecm uses the wrong names cluster-95ct8cddbt and user-95ct8cddbt instead of the correct names k3d-testkube and admin@k3d-testkube

Here is original kubeconfig:

---
apiVersion: v1
clusters:
  - cluster:
      certificate-authority-data: DATA+OMITTED
      server: REDACTED
    name: k3d-testkube
contexts:
  - context:
      cluster: k3d-testkube
      user: admin@k3d-testkube
    name: k3d-testkube
current-context: k3d-testkube
kind: Config
preferences: {}
users:
  - name: admin@k3d-testkube
    user:
      client-certificate-data: REDACTED
      client-key-data: REDACTED

Here is after kubecm add -f:

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: DATA+OMITTED
    server: REDACTED
  name: cluster-95ct8cddbt # wrong
contexts:
- context:
    cluster: cluster-95ct8cddbt # wrong
    user: user-95ct8cddbt # wrong
  name: k3d-testkube
current-context: ""
kind: Config
preferences: {}
users:
- name: user-95ct8cddbt # wrong
  user:
    client-certificate-data: REDACTED
    client-key-data: REDACTED
@sunny0826
Copy link
Owner

CLUSTER and USER often have duplicate names, so they are hashed and renamed once each time they are merged, and do not affect their use.

@sunny0826 sunny0826 added the question Further information is requested label May 26, 2022
@thesn10
Copy link
Author

thesn10 commented May 26, 2022

Yes it does not affect their use, but it is still annoying.
I think kubecm should keep the names by default and only if there is a duplicate it should ask to rename

@sunny0826 sunny0826 self-assigned this May 27, 2022
@sunny0826
Copy link
Owner

This is a great idea, thanks for the feedback

@astraw99
Copy link
Contributor

astraw99 commented Sep 8, 2022

Fixed by #536.
Please update to the latest version.

@thesn10
Copy link
Author

thesn10 commented Sep 8, 2022

@astraw99 Thank you for fixing the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants