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

cloud add command fails, if ~/.kube/ does not exits #888

Closed
jkroepke opened this issue Feb 11, 2024 · 6 comments
Closed

cloud add command fails, if ~/.kube/ does not exits #888

jkroepke opened this issue Feb 11, 2024 · 6 comments
Assignees
Labels
kind/bug Something isn't working

Comments

@jkroepke
Copy link
Contributor

Describe the bug
cloud add command fails, if ~/.kube/ does not exits

To Reproduce
Steps to reproduce the behavior:

  1. rm -rf ~/.kube/
  2. Run kubecm cloud add

Expected behavior

No error

Screenshots

Bildschirmfoto 2024-02-11 um 20 17 08

Desktop (please complete the following information):

  • OS: [e.g. iOS] MacOS
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@sunny0826 sunny0826 added the kind/bug Something isn't working label Feb 15, 2024
@sunny0826
Copy link
Owner

Indeed it is a bug, a method to initialize kubeconfig should be added when ~/.kube/ does not exist.

@AdamRussak
Copy link
Contributor

@sunny0826 I'll try to help here :)
I got a function doing this in my repo: https://github.com/AdamRussak/k8f/blob/575e55ebe5d7419fbee650c7203b86f222c121d8/core/core.go#L113

I think I could use it here (probably will need small adjustments

@sunny0826
Copy link
Owner

@AdamRussak Thanks

@AdamRussak
Copy link
Contributor

i started working on it.
but i need to fix e2e now.. (learn whats going on first :)

@sunny0826 if you want to see if I'm in the right direction feel free to take a look :|
https://github.com/AdamRussak/kubecm

@AdamRussak AdamRussak mentioned this issue Jun 6, 2024
7 tasks
@sunny0826
Copy link
Owner

@AdamRussak I don't see an e2e error reported in #967, do you mean to add an e2e test for this feature?

sunny0826 pushed a commit that referenced this issue Jun 7, 2024
…#967)

* add create kubeconfig file

* improve logic to craate default path config

* revert dir check for merge

* removed a func that is not used

* added unit tests

* fix unit tests
@sunny0826
Copy link
Owner

This issue has been fixed in v0.30.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants