Skip to content

Commit

Permalink
apply kubecontext setting to kubectl client
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Curran authored and komish committed Jul 18, 2023
1 parent 40ba87f commit 01403ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/tool/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func GetClientConfig(envSettings *cli.EnvSettings) clientcmd.ClientConfig {

return clientcmd.NewNonInteractiveDeferredLoadingClientConfig(
loadingRules,
&clientcmd.ConfigOverrides{})
&clientcmd.ConfigOverrides{CurrentContext: envSettings.KubeContext})
}

func getDeploymentsList(k Kubectl, context context.Context, namespace string, selector string) ([]v1.Deployment, error) {
Expand Down

0 comments on commit 01403ec

Please sign in to comment.