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
service controller trigger update when service ipfamilies changes #116520
Conversation
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
/assign @aojea |
/lgtm |
LGTM label has been added. Git tree hash: 5f43679dc516613007d56fe0ef3ed8961c15e1d6
|
/lgtm seems fine, only small thing, that it strongly relies on the fact that first ipFamily can not change, which is true, and probably will continue being true |
service update validate L5176 defines User can upgrade (add another clusterIP or ipFamily) or can downgrade (remove secondary clusterIP or ipFamily), but CAN NOT change primary/secondary clusterIP || ipFamily UNLESS they are changing from/to/ON ExternalName |
@@ -582,6 +582,12 @@ func (c *Controller) needsUpdate(oldService *v1.Service, newService *v1.Service) | |||
return true | |||
} | |||
|
|||
if len(oldService.Spec.IPFamilies) != len(newService.Spec.IPFamilies) { |
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.
Does the order matter in this case? Should we check order in addition to length of ip families?
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.
see comment #116520 (comment)
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.
can we add a comment in the code with this context?
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.
can we add a comment in the code with this context?
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.
done, add comment with this context. PTAL
Signed-off-by: DingShujie <dingshujie@huawei.com>
dcc9973
to
8cbe9fe
Compare
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.
/approve
/lgtm
LGTM label has been added. Git tree hash: fa41a0f197a305c28c9d2e657583478772c19c08
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewsykim, Dingshujie 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 |
Signed-off-by: DingShujie <dingshujie@huawei.com>
@andrewsykim @aojea PTAL |
re-apply LGTM (after the gofmt update) /lgtm |
LGTM label has been added. Git tree hash: b1387f7cd9ce61f0521773b1e94b9c1c9db4c63d
|
What type of PR is this?
/kind bug
What this PR does / why we need it:
when loadbancer service ipFamilies change from dualstack to single stack or from single stack to dualstack,service controller need to trigger update in cloud provider
Which issue(s) this PR fixes:
Fixes #116495
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: