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
Show topologySpreadConstraints in Describe command #109563
Show topologySpreadConstraints in Describe command #109563
Conversation
Currently describe command does not show `topologySpreadConstraints` field. This PR adds support for showing topologySpreadConstraints in describe command.For simplicity, if this field is not set, it will not show (unlike to other core fields whose are shown as `<none>` even if they are null).
Please note that we're already in Test Freeze for the |
@@ -2110,6 +2137,7 @@ func DescribePodTemplate(template *corev1.PodTemplateSpec, w PrefixWriter) { | |||
} | |||
describeContainers("Containers", template.Spec.Containers, nil, nil, w, " ") | |||
describeVolumes(template.Spec.Volumes, w, " ") | |||
describeTopologySpreadConstraints(template.Spec.TopologySpreadConstraints, w, " ") |
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.
Strange we don't show all the information for a pod template. I wonder what the criteria is for deciding what should be shown for a pod template. For example, we don't show tolerations.
I think it is fine to add this here. I wonder if we should (as a separate PR) add the other spec fields, where they make sense.
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 think it is fine to add this here. I wonder if we should (as a separate PR) add the other spec fields, where they make sense.
I have the same question in my mind. As far as I understand, since describe
is nicer way to showing resources, there is no promise that describe
shows everything get
shows.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ardaguclu, brianpursley 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 |
/triage accepted |
What type of PR is this?
/kind feature
/kind bug
What this PR does / why we need it:
Currently describe command does not show
topologySpreadConstraints
field(although get command returns). This PR adds support for showing topologySpreadConstraints in
describe command.For simplicity, if this field is not set, it will not show
(unlike to other core fields whose are shown as
<none>
even if they are null).For
kubectl describe pod/testpod
, result will be like;For
kubectl describe deployment/testdeployment
, result will be like;Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?