-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Stop setting selfLink in kubectl #108165
Stop setting selfLink in kubectl #108165
Conversation
@wojtek-t: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
@@ -813,7 +813,6 @@ func (o *GetOptions) printGeneric(r *resource.Result) error { | |||
} | |||
if listMeta, err := meta.ListAccessor(obj); err == nil { | |||
list.Object["metadata"] = map[string]interface{}{ | |||
"selfLink": listMeta.GetSelfLink(), |
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 would still make this conditional so that if we're talking to an old server we don't drop the field before the server does :)
if selfLink := listMeta.GetSelfLink(); len(selfLink) > 0 {
list.Object["metadata"]["selfLink"] = selfLink
}
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 understand your concern, but I'm not sure I fully agree with you.
Basically, the reason why we decided to deprecate selflink is not just it was causing us some issues, but most of all that noone was really using it for anything useful. So given that their apiserver will sooner or later stop setting selflinks, do we really still need to print it?
If someone really needs it, they are still able to get it via -o json or -o yaml or etc.
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.
hmm... since the field stopped being populated by default well outside the stated kubectl skew, I guess simply dropping is ok.
if the server had just stopped populating this release, I'd still push to make this conditional
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 yeah - I should have mentioned that too, I agree this point is important.
needs gofmt, then lgtm |
@liggitt - thanks, PTAL |
22d277b
to
9015f27
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, wojtek-t 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 |
/kind feature |
/test pull-kubernetes-integration |
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
/king feature
/sig cli
/priority important-longterm
/assign @liggitt @soltysh