Skip to content

Add Support for --kubeconfig flag in skaffold run/dev commands #2699

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

Closed
sujit-kamireddy opened this issue Aug 21, 2019 · 9 comments · Fixed by #3100
Closed

Add Support for --kubeconfig flag in skaffold run/dev commands #2699

sujit-kamireddy opened this issue Aug 21, 2019 · 9 comments · Fixed by #3100
Labels
area/deploy deploy/helm deploy/kubectl deploy/kustomize good first issue Good for newcomers help wanted We would love to have this done, but don't have the bandwidth, need help from contributors ide kind/feature-request priority/p1 High impact feature/bug.

Comments

@sujit-kamireddy
Copy link

sujit-kamireddy commented Aug 21, 2019

Skaffold run/dev commands support the --kube-context flag to get the context name, but relies on the KUBECONFIG env variable to get the list of kubeconfig file(s).

The ask is below:
Like the kubectl, support --kubeconfig flag that takes a single kubeconfig file path and prefer this flag over the KUBECONFIG env variable when both are present.

Adding this flag will enable us to specify the exact kubeconfig file and the context name that we want to work with, in a consistent way.

Reference: https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig

@balopat balopat added kind/feature-request area/deploy deploy/helm deploy/kubectl deploy/kustomize ide priority/p1 High impact feature/bug. priority/p0 Highest priority. We are actively looking at delivering it. good first issue Good for newcomers and removed priority/p1 High impact feature/bug. labels Aug 21, 2019
@balopat
Copy link
Contributor

balopat commented Aug 21, 2019

this should be relatively easy to implement, it's a medium sized work, we need to make sure we test for these too:

  1. kustomize/kubectl: we can pass the value of the flag directly to kubectl, probably here: https://github.com/GoogleContainerTools/skaffold/blob/master/pkg/skaffold/kubectl/cli.go#L83
  2. helm: does not support it (add --kubeconfig option helm/helm#2219) so we need to set the env var - probably here: https://github.com/GoogleContainerTools/skaffold/blob/master/pkg/skaffold/deploy/helm.go#L159
  3. for client-go, somewhere here: https://github.com/GoogleContainerTools/skaffold/blob/master/pkg/skaffold/kubernetes/context/context.go#L75

@balopat balopat added the help wanted We would love to have this done, but don't have the bandwidth, need help from contributors label Aug 21, 2019
@marti1125
Copy link
Contributor

Could I work on this ?

@balopat
Copy link
Contributor

balopat commented Sep 18, 2019

Hi @marti1125, absolutely!

@balopat balopat mentioned this issue Sep 20, 2019
@tejal29 tejal29 added priority/p1 High impact feature/bug. and removed priority/p0 Highest priority. We are actively looking at delivering it. labels Sep 23, 2019
@corneliusweig
Copy link
Contributor

@marti1125 Are you still working on this? If you need input or support feel free to ping me.

@marti1125
Copy link
Contributor

yes please I need help @corneliusweig at slack

@corneliusweig
Copy link
Contributor

corneliusweig commented Oct 6, 2019

yes please I need help @corneliusweig at slack

I found your message in the #skaffold channel and pinged you. If feasible, I would prefer to keep the conversation on github though.

@marti1125 marti1125 mentioned this issue Oct 9, 2019
7 tasks
@balopat
Copy link
Contributor

balopat commented Oct 16, 2019

ping @marti1125 @corneliusweig are you looking at this? It would be important for us to move forward with it. Let me know!

@corneliusweig
Copy link
Contributor

@marti1125 Would you be ok if I send a PR and you do a review round on it? Given the priority of the issue this might be a good alternative. WDYT?

@marti1125 marti1125 removed their assignment Oct 17, 2019
@marti1125
Copy link
Contributor

@corneliusweig yes please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deploy deploy/helm deploy/kubectl deploy/kustomize good first issue Good for newcomers help wanted We would love to have this done, but don't have the bandwidth, need help from contributors ide kind/feature-request priority/p1 High impact feature/bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants