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
Fix karmadactl init
can not read KUBECONFIG environment variable issue
#1437
Conversation
/retest |
@huone1 @XiShanYongYe-Chang
|
Hi @lonelyCZ, can you rebase the latest code, we have solved the CI failed. |
c452a6e
to
4b27bd8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
This pr will be conflict with #1455
Got it. Thanks. :) |
Please add a release note on the PR description. By the way, should we cherry-pick this to release branches? cc @prodanlabs might want to know what we are going to do. |
I'll take a look when I'm free, I have no problem here. thx |
Do I need to cheery-pick this now? @RainbowMango |
Hold on until this is merged to master. I haven't looked at this yet, will do it ASAP. |
// check config path of host kubernetes cluster | ||
env := os.Getenv("KUBECONFIG") | ||
if env != "" { | ||
i.KubeConfig = env | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean KUBECONFIG
environment would override --kubeconfig
?
The kubectl get config according to following rules, that we can't violate :
- Via the command-line flag --kubeconfig
- Via the KUBECONFIG environment variable
- In your home directory as ~/.kube/config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will fix it as these rules.
Signed-off-by: lonelyCZ <531187475@qq.com>
4b27bd8
to
d3ac601
Compare
Abide by the rules and the conflict has been fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
Leave LGTM to @XiShanYongYe-Chang
retitle Fix karmadactl init
can not read KUBECONFIG environment variable issue
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retitle Fix |
karmadactl init
can not read KUBECONFIG environment variable issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Hi @lonelyCZ Would you like cherry-pick this patch to |
Yes, thanks. I will try to do it. |
…-upstream-release-1.1 Automated cherry pick of #1437: fix `karmadactl init` can not read KUBECONFIG environment variable issue
…-upstream-release-1.0 Automated cherry pick of #1437: fix `karmadactl init` can not read KUBECONFIG environment variable issue
Signed-off-by: lonelyCZ 531187475@qq.com
What type of PR is this?
/kind bug
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #1430
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
/cc @RainbowMango @XiShanYongYe-Chang @prodanlabs