-
Notifications
You must be signed in to change notification settings - Fork 40.6k
Deprecate kubeconfig's preference field in favor of kuberc #131741
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
/triage accepted |
@liggitt a question for this deprecation, given this field is not used internally by any part of kubernetes codebase, can we consider entirely dropping it or we'll have to keep it deprecated? |
@@ -51,6 +52,7 @@ type Config struct { | |||
Extensions []NamedExtension `json:"extensions,omitempty"` | |||
} | |||
|
|||
// Deprecated in v1.34 in favor of kuberc file (see https://kep.k8s.io/3104). | |||
type Preferences struct { | |||
// +optional | |||
Colors bool `json:"colors,omitempty"` |
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.
do we not even honor this field in kubectl
? 🤦
looks like the only spot we use color is in the warning writer, and that just goes off of terminal autodetection and the NO_COLOR envvar
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.
do we not even honor this field in
kubectl
? 🤦
Nope, it's just not used 😞
umm... we don't know what else is plumbing / persisting data in the extensions field, and given we named it extensions, it sort of invites opaque plumbing by out-of-tree stuff, so I think we should just keep it marked deprecated |
@@ -37,6 +37,7 @@ type Config struct { | |||
// +optional | |||
APIVersion string `json:"apiVersion,omitempty"` | |||
// Preferences holds general information to be use for cli interactions | |||
// Deprecated in v1.34 in favor of kuberc file (see https://kep.k8s.io/3104). |
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'm not sure referencing kuberc here makes sense... nothing under this struct has any relationship with anything in kuberc, right?
Just adding a deprecation comment, indicating no Kubernetes components make use of this field, and adding omitzero
to clean up preferences: {}
noise might be nice
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'm not sure referencing kuberc here makes sense... nothing under this struct has any relationship with anything in kuberc, right?
Just adding a deprecation comment, indicating no Kubernetes components make use of this field, and adding
omitzero
to clean uppreferences: {}
noise might be nice
Updated deprecation message and added omitzero
. Should be good for re-review.
0016ea9
to
bb92b61
Compare
/lgtm |
LGTM label has been added. Git tree hash: 3edf93325ce38f6710f8558417218ae1e6f48c86
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, soltysh 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 |
Signed-off-by: Maciej Szulik <[email protected]>
bb92b61
to
8cf5e8d
Compare
/lgtm |
LGTM label has been added. Git tree hash: 55922b69c376a3765be6d5be3a64f0d2dc4b10b8
|
/lgtm |
Flake #131834 |
@@ -607,7 +607,6 @@ clusters: | |||
contexts: null | |||
current-context: "" | |||
kind: Config | |||
preferences: {} |
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.
this broke one of kubeadm's e2e tests for dryrun which under the hood utilizes a fake client with reactors and fixtures. more particularly it dryruns the bootstrap token and cluster-info configmap validation.
we must also update line 614 with the expected JWS signature after the contents of the cluster-info have changed.
fix is pending, looking for lgtm:
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.
Sorry about that, didn't catch that bit anywhere.
What type of PR is this?
/kind cleanup
/kind documentation
/kind feature
/kind api-change
/kind deprecation
What this PR does / why we need it:
While updating the kuberc KEP I've noticed we explicitly said we'll deprecate the kubeconfig's preferences field.
Which issue(s) this PR fixes:
Ref: kubernetes/enhancements#3104
Special notes for your reviewer:
/assign @ardaguclu
for sig-cli changes
/assign @liggitt
for api-review
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: