Skip to content
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

Trigger updating DualStack ILB Service if ipFamilies changed #1928

Merged

Conversation

panslava
Copy link
Contributor

@panslava panslava commented Feb 1, 2023

Currently, updating ipFamilies do not trigger L4 ILB service update. This is a bug fix

/assign cezarygerard
/assign mmamczur

@k8s-ci-robot
Copy link
Contributor

@panslava: GitHub didn't allow me to assign the following users: mmamczur.

Note that only kubernetes members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

Currently, updating ipFamilies do not trigger L4 ILB service update. This is a bug fix

/assign cezarygerard
/assign mmamczur

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.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 1, 2023
@k8s-ci-robot k8s-ci-robot requested review from aojea and thockin February 1, 2023 22:02
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 1, 2023
@panslava panslava changed the title Trigger update DualStack ILB Service if ipFamilies changed Trigger updating DualStack ILB Service if ipFamilies changed Feb 1, 2023
@panslava panslava force-pushed the ipv6-ilb-update-ipfamilies branch from 4909dfc to 23cadfd Compare February 1, 2023 22:06
@@ -482,6 +482,11 @@ func (l4c *L4Controller) needsUpdate(oldService *v1.Service, newService *v1.Serv
oldService.Spec.HealthCheckNodePort, newService.Spec.HealthCheckNodePort)
return true
}
if l4c.enableDualStack && !reflect.DeepEqual(oldService.Spec.IPFamilies, newService.Spec.IPFamilies) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or maybe comparing ClusterIPs ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was considering it, but I think IPFamilies are better,

All the logic in sync depends on IPFamilies (to identify if service needs ipv4 or ipv6), and, we don't really need info about exactly clusterIPs changes (even though they should not change without ipFamilies..), we only need to know ipFamilies state

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we care about ordering here?
if it changes from IPv4,IPv6 -> IPv6,IPv4 should this trigger an update?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, just, by kubernetes design, first ipFamily should never change, because 1st ipFamily correlates with ClusterIP which is immutable (not ClusterIPs)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but maybe I should not rely on kubernetes still?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so it's super unlikely anyway because it would be rejected by the apiserver
I'd leave that since one extra 'update' won't hurt us

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think so too :)

@aojea
Copy link
Member

aojea commented Feb 2, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 2, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aojea, panslava

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 89d0d76 into kubernetes:master Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants