feat: make Gateway.Spec.Addresses.Value optional#3616
feat: make Gateway.Spec.Addresses.Value optional#3616k8s-ci-robot merged 10 commits intokubernetes-sigs:mainfrom
Gateway.Spec.Addresses.Value optional#3616Conversation
|
Hi @EyalPazz. 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. DetailsInstructions 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-sigs/prow repository. |
youngnick
left a comment
There was a problem hiding this comment.
This needs more specification; changing a field to optional is not a breaking change, but it is a big one that will require code updates from all controllers. If you are proposing this, including how to handle empty values for implementations that support it and do not will be important.
We may also need an extended feature to cover this GatewayAddressEmpty or something, so that we can slice the conformance tests accordingly.
| // | ||
| // Examples: `1.2.3.4`, `128::1`, `my-ip-address`. | ||
| // | ||
| // +optional |
There was a problem hiding this comment.
This needs some more explanation:
- what behavior is expected if an implementation supports an empty
Valuehere? - what behavior is expected if an implementation does not support an empty
Valuehere?
This should then guide you to adding some conformance tests for implementations to test against.
There was a problem hiding this comment.
+1 to @youngnick's comments, a couple suggestions as a starting point:
- If an implementation does support an empty value, we expect them to assign an address matching the type that has been requested with a value of the implementation's choice.
- If an implementation does not support an empty value, we expect them to set the
Programmedcondition in status toFalsewith a reason ofAddressNotAssigned. Here's what that reason means as a reference:
gateway-api/apis/v1/gateway_types.go
Lines 874 to 886 in d936258
There was a problem hiding this comment.
I think the extra doc requirement here got missed. I'd still like to see some description of what should happen in both cases on this field, if it's supported and not.
There was a problem hiding this comment.
Thanks for catching this @youngnick! @EyalPazz any chance you can squeeze this in in the next day or two? Really hoping we can fit this into v1.3 if possible, and we'll need to cut a RC pretty soon.
26365be to
d39cc82
Compare
|
@youngnick, this isn't ready for merge yet, i wanted your opinion on injecting a valid |
d39cc82 to
581ba80
Compare
|
@shaneutt , i'd also appreciate your opinion here, as i saw you wrote the |
That seems reasonable, yes. |
| // | ||
| // Examples: `1.2.3.4`, `128::1`, `my-ip-address`. | ||
| // | ||
| // +optional |
There was a problem hiding this comment.
+1 to @youngnick's comments, a couple suggestions as a starting point:
- If an implementation does support an empty value, we expect them to assign an address matching the type that has been requested with a value of the implementation's choice.
- If an implementation does not support an empty value, we expect them to set the
Programmedcondition in status toFalsewith a reason ofAddressNotAssigned. Here's what that reason means as a reference:
gateway-api/apis/v1/gateway_types.go
Lines 874 to 886 in d936258
|
@youngnick @robscott can you please re-review this? |
4cd24c2 to
687de42
Compare
|
Hey @EyalPazz, I chatted with @youngnick about this and we agreed that it would make sense to move the conformance test for this into a follow up PR. The rationale is that as long as we have a clearly defined API spec for this, the conformance test would be covering with 99+% of implementations already do (automatically assign an IP address to a Gateway), so it's not quite as critical as we'd initially thought. Will you have time to update the PR in the next day or two to reflect this new smaller scope? Would love to get this into v1.3 if possible. |
Yea for sure, i'll do it tomorrow morning |
|
Should be ok now :) @robscott |
|
Thanks @EyalPazz! Will leave final LGTM for @youngnick or someone else. /approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: EyalPazz, robscott The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
I missed something when I approved. Adding a hold until #3616 (comment) is addressed. /hold |
|
Thanks @EyalPazz! This LGTM, will defer to @youngnick for final approval. /hold cancel |
|
Thanks for the extra changes @EyalPazz, great work. /lgtm |
) * feat: make `Gateway.Spec.Addresses.Value` optional * wip: test mock * feat: flag injection & change `GatewayAddress` -> `GatewaySpecAddress` * add `omitempty` to the value * chore: update codegen * fix: type validation and minLength * chore: remove conformance test for now * complete rename of `GatewayAddress` -> `GatewaySpecAddress` * fix: improve docs for value field * fix: value field doc
What type of PR is this?
/kind feature
Which issue(s) this PR fixes:
Fixes #3612
Does this PR introduce a user-facing change?: