-
Notifications
You must be signed in to change notification settings - Fork 472
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
add a description field for GatewayClass #653
Conversation
Welcome @hzliangbin! |
Hi @hzliangbin. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
apis/v1alpha2/gatewayclass_types.go
Outdated
// +kubebuilder:validation:MinLength=1 | ||
// +kubebuilder:validation:MaxLength=64 | ||
// +optional | ||
Description *string `json:"description,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.
I think this field should be on the spec struct.
/ok-to-test |
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.
/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.
// Description helps describe a GatewayClass with more details. | ||
// | ||
// +kubebuilder:validation:MinLength=1 | ||
// +kubebuilder:validation:MaxLength=64 |
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.
Is 64 enough? Should we bump this up to 128? Should we give users at least a tweet to describe their classes?
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 I'd be open to expanding this in the future if needed, I think a primary goal of this was to enable helpful kubectl output, so something that could fit in a single row would be ideal.
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.
128 isn't that much more -- we aren't using VT100's anymore...
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.
Thanks for your work on this @hzliangbin!
apis/v1alpha2/gatewayclass_types.go
Outdated
@@ -28,6 +28,7 @@ import ( | |||
// +kubebuilder:storageversion | |||
// +kubebuilder:printcolumn:name="Controller",type=string,JSONPath=`.spec.controller` | |||
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` | |||
// +kubebuilder:printcolumn:name="Description",type=string,JSONPath=`.spec.description` |
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.
We may want to set a priority field here. That would enable us to only include this in the wide output.
// +kubebuilder:printcolumn:name="Description",type=string,JSONPath=`.spec.description` | |
// +kubebuilder:printcolumn:name="Description",type=string,JSONPath=`.spec.description`,priority=1 |
apis/v1alpha2/gatewayclass_types.go
Outdated
|
||
// Description helps describe a GatewayClass with more details. | ||
// | ||
// +kubebuilder:validation:MinLength=1 |
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.
It feels a bit confusing to enforce a min length on an optional field.
/lgtm |
/lgtm cancel |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bowei, hzliangbin 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 |
What type of PR is this?
What this PR does / why we need it:
add a field to help describe gatewayclass
Which issue(s) this PR fixes:
Fixes #
#610
Does this PR introduce a user-facing change?: