feat: add a kubeconfig flag to specify kubeconfig file location#133
Conversation
|
Welcome @YTGhost! |
|
Hi @YTGhost. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@levikobi @LiorLieberman PTAL |
|
/cc |
LiorLieberman
left a comment
There was a problem hiding this comment.
Thanks @YTGhost
This is set an environment variable for users when they invoke the command. This env var will be user in their subsequent requests with kubectl.
Can we simply change it to just read a --kubeconfig path?
I'd suggest you check if this function can help us.
Two more small bullets:
please note that we have two uses of the config, here and here. We should consider making them consistent with the new kubeconfig file flag.
I dont think we need to update go.mod can you revert it?
bd3e221 to
02e3a68
Compare
@LiorLieberman Thank you for such detailed review suggestions! I have made the corresponding code changes. PTAL |
|
/ok-to-test |
LiorLieberman
left a comment
There was a problem hiding this comment.
Thanks @YTGhost. Actually I think I was wrong and your initial approach with the env was easier. (no need to add function parameters and make it more consistent)
Can you please change it again to the env based approach? Apologies for the confusion. I also pinged you offline with an idea
Signed-off-by: Liang Deng <283304489@qq.com>
02e3a68 to
fdb7cbd
Compare
Hey Lior, I've updated the code for setting the environment variable. PTAL |
|
/retest |
Looks like something went wrong with the unit test, still trying to fix that :) |
I dont understand whats wrong either, tests work perfectly fine locally. Can you try to rebase? |
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: LiorLieberman, YTGhost The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…rnetes-sigs#133) Signed-off-by: Liang Deng <283304489@qq.com>
…rnetes-sigs#133) Signed-off-by: Liang Deng <283304489@qq.com>
What type of PR is this?
/kind feature
What this PR does / why we need it:
Some users and organizations work with multiple Kubernetes clusters by utilizing multiple config files instead of one. The
--kubeconfigflag allows you to switch between these clusters by specifying different configuration files.Which issue(s) this PR fixes:
Fixes #81
Does this PR introduce a user-facing change?: