-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
In 'kubectl describe', find controllers with ControllerRef, instead of showing the original creator #42849
In 'kubectl describe', find controllers with ControllerRef, instead of showing the original creator #42849
Conversation
96b7149
to
dd7e2d8
Compare
This is really late for 1.6 - do we really have to do this? |
@smarterclayton I don't see this as release blocking, but current |
dd7e2d8
to
57703ae
Compare
w.Write(LEVEL_0, "Created By:\t%s\n", createdBy) | ||
} | ||
if controlledBy := printController(pod); len(controlledBy) > 0 { | ||
w.Write(LEVEL_0, "Controller:\t%s\n", controlledBy) |
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.
"Controller" is probably one of the most overused words in the community. How about "Controlled By"?
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.
Done
@@ -1338,6 +1351,9 @@ func describeReplicaSet(rs *extensions.ReplicaSet, events *api.EventList, runnin | |||
w.Write(LEVEL_0, "Selector:\t%s\n", metav1.FormatLabelSelector(rs.Spec.Selector)) | |||
printLabelsMultiline(w, "Labels", rs.Labels) | |||
printAnnotationsMultiline(w, "Annotations", rs.Annotations) | |||
if controlledBy := printController(rs); len(controlledBy) > 0 { | |||
w.Write(LEVEL_0, "Controller:\t%s\n", controlledBy) |
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.
Similar comment as above
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.
Done
@janetkuo Since this is not release-blocking, we should move it to the |
…f showing the original creator
57703ae
to
b29135e
Compare
@Kargakis PTAL |
return "" | ||
} | ||
|
||
func printCreator(annotation map[string]string) 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.
I am wondering if created-by is used for anything else that the controller ref cannot. Can you spawn a separate issue to deprecate it and start removing it from places we can while keeping backwards compatibility?
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.
Sure
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.
Filed #44407
/lgtm but I thought we wanted to deprecate created-by in favor of controller ref. Separate issue for discussing. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eparis, janetkuo, kargakis
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue |
@enisoc @Kargakis @kubernetes/sig-apps-pr-reviews @kubernetes/sig-cli-pr-reviews