-
Notifications
You must be signed in to change notification settings - Fork 40.6k
fix kubectl --local flag bug across all commands #93298
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
Conversation
Hi @SaiHarshaK. Thanks for your PR. I'm waiting for a kubernetes 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. Instructions 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. |
// DefaultClientConfig represents the legacy behavior of this package for defaulting | ||
// DEPRECATED will be replace | ||
DefaultClientConfig = DirectClientConfig{*clientcmdapi.NewConfig(), "", &ConfigOverrides{ | ||
ClusterDefaults: ClusterDefaults, | ||
}, nil, NewDefaultClientConfigLoadingRules(), promptedCredentials{}} | ||
) | ||
|
||
// getDefaultServer returns a default setting for DefaultClientConfig | ||
// DEPRECATED | ||
func getDefaultServer() string { |
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.
pull this bit out of your PR please. That will contain it sig-cli.
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.
I'll revert the changes to this file and relevant ones
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.
Ill squash the commits?
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: SaiHarshaK The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
6e88616
to
3be6384
Compare
/ok-to-test |
/retest |
4d37444
to
d54fe28
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.
/hold
o.Namespace, _, err = f.ToRawKubeConfigLoader().Namespace() | ||
if err != nil { | ||
return err | ||
if !o.local { |
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.
Although this solves the problem, that's not the right approach. See what I wrote in #93188, towards the bottom. You picked the hacky solution which we don't want to happen. The entire sig including the tech leads would like to see a more general solution, rather this one off.
/close |
@soltysh: Closed this PR. In response to this:
Instructions 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. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Kubectl "local" flag won't ask for kubeconfig after deprecated functionality in #90243 is removed.
Which issue(s) this PR fixes:
Fixes #93188
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: