crd, Status.IPs: Add omitempty, MinItems attributes#11
Conversation
maiqueb
left a comment
There was a problem hiding this comment.
Why is this essential ? Can't you just set an empty slice ?
It is essintial to be able to set status attributes (such as conditions) even if the IPs field is empty. This requires making the attribute `omitempty`. Signed-off-by: Ram Lavi <ralavi@redhat.com>
b7bef6a to
1939fe4
Compare
maiqueb
left a comment
There was a problem hiding this comment.
This is better.
But I need to see some test checking this out.
|
I think we need a complementary MaxItems as well. |
That's off scope. Not saying it doesn't make sense, just saying it has nothing to do with what we're attempting to do here. And while saying that, I'm against setting |
@maiqueb adding this PR on top of ovn-kubernetes/ovn-kubernetes#5683 (see commit) makes the e2e pass (i.e. before- failing, after - passing). |
|
Fix included in accepted release 4.22.0-0.nightly-2026-01-06-164201 |
|
closing as this change was not accepted by the community |
This PR is setting the omitempty and MinItems=1 to the IPs field.
Reason: it is essintial to be able to set status attributes (such as conditions) even if the IPs field is empty.
This requires making the attribute
omitempty.Setting the MinItems=1 is meant to avoid setting an empty slice which is confusing according to the API team.