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

Add error handling when unable to get config from cluster #577

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pbzona
Copy link

@pbzona pbzona commented Oct 24, 2020

Hello! I ran into an error while trying to install the runner, so I figured I'd make a quick PR. What happened was this:

I tried to init a new runner per the instructions in the UI, and was met with this:

phil@pzona:~# codefresh runner init --token xxx.yyy
This installer will guide you through the Codefresh Runner installation process
Error: ENOENT: no such file or directory, open '/var/run/secrets/kubernetes.io/serviceaccount/token'

Not the most useful message, so I found that the CLI tries to load the kubeconfig from its path, then directly from the cluster, and doesn't fall back to anything else. I added an extra step to make this failure a bit more intuitive.

A side note - I didn't realize at first that the runner host would need to be configured for the cluster before initializing. After a second thinking about it, of course it would, but I didn't see this mentioned in the docs at all so you might consider adding a note about that in a "prerequisites" section or something. That would have been helpful in this situation as well.

Anyway, I hope this is helpful. I'm not deeply invested in the actual error text here, so feel free to make changes if you are interested in merging this :)

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

Successfully merging this pull request may close these issues.

1 participant