-
Notifications
You must be signed in to change notification settings - Fork 40k
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 missing word to ServiceSpec doc #97896
Conversation
Welcome @brpratt! |
Hi @brpratt. Thanks for your PR. I'm waiting for a kubernetes 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. |
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
/ok-to-test |
@@ -4150,7 +4150,7 @@ type ServiceSpec struct { | |||
// externalName is the external reference that discovery mechanisms will | |||
// return as an alias for this service (e.g. a DNS CNAME record). No | |||
// proxying will be involved. Must be a lowercase RFC-1123 hostname | |||
// (https://tools.ietf.org/html/rfc1123) and requires Type to be | |||
// (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName |
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.
// (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName | |
// (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". |
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 will make the suggested change and regenerate the other files.
Is there a convention doc I can reference that explains how to annotate these comments? From the suggestion, it appears as though field names should be surrounded by backticks and field values are surrounded by double quotes. I noticed that this convention isn't followed for many other field descriptions.
For example, should similar changes be made in the comment for the HealthCheckNodePort
field in ServiceSpec?
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.
The rule of thumb is that the comments are used to generate user-facing documents. Users will see field names encoded in the JSON (OpenAPI spec), not the Golang field name. That is the reason we need to change "Type" to type
. The ExternalName is a string value to be assigned to the type
field, adding the double quotes is for clarification.
a9560e9
to
5c82e44
Compare
/test pull-kubernetes-e2e-gce-ubuntu-containerd |
@@ -4150,7 +4150,7 @@ type ServiceSpec struct { | |||
// externalName is the external reference that discovery mechanisms will | |||
// return as an alias for this service (e.g. a DNS CNAME record). No | |||
// proxying will be involved. Must be a lowercase RFC-1123 hostname | |||
// (https://tools.ietf.org/html/rfc1123) and requires Type to be | |||
// (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". |
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 couldn't´t find any other place on the files that uses backticks for type
, should we keep it as is?
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 added backticks per this suggestion:
Indeed, I can't find many usages of backticks in this file, but I didn't know if using backticks to annotate field names was a new convention.
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.
ups sorry, I missed it, my fault, scratch my comment please
/sig api-machinery |
/assign @lavalamp |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brpratt, lavalamp 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 |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
What type of PR is this?
/kind documentation
What this PR does / why we need it:
The description for
externalName
in ServiceSpec ends rather abruptly:This PR adds the missing
ExternalName
to the end of this description.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: