-
Notifications
You must be signed in to change notification settings - Fork 518
fix: OCPBUGS-93456: changes NodePortPublishingStrategy.Port #9002
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1102,7 +1102,7 @@ type NodePortPublishingStrategy struct { | |
| // port is the port of the NodePort service. If <=0, the port is dynamically | ||
| // assigned when the service is created. | ||
| // +optional | ||
| Port int32 `json:"port,omitempty"` | ||
| Port *int32 `json:"port,omitempty"` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the expected behaviour of this field if the field is omitted? E.g. in the future when this is a nil pointer, what would you expect to happen?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is what Claude is suggesting to me (new area, took this bug as an opportunity to learn) -
I've updated the godoc to: "If not specified or set to 0, the port is dynamically assigned when the service is created." (not yet pushed, will do)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The immutability of services implemented by this CEL rule makes this round tripping issue a genuine problem. Walking through the examples and possible solutions. Today, an unstructured client can set If we instead changed the field to drop the We could prevent the Or we continue to allow the So, do we, or do we not want to allow unstructured users to explicitly set |
||
| } | ||
|
|
||
| // LoadBalancerPublishingStrategy specifies setting used to expose a service as a LoadBalancer. | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 should also document what a nil value here means with the new type.