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

fix: IPFamilyPolicy not synced for default vcluster service #1592

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

rohantmp
Copy link
Contributor

What issue type does this pull request address? (keep at least one, remove the others)
/kind bugfix

What does this pull request do? Which issues does it resolve? (use resolves #<issue_number> if possible)
resolves ENG-3024
fixes #1587

Please provide a short message that should be published in the vcluster release notes
Fixed an issue where vcluster has incorrectly

What else do we need to know?

Copy link

netlify bot commented Mar 14, 2024

Deploy Preview for vcluster-docs canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit cb6ced0
🔍 Latest deploy log https://app.netlify.com/sites/vcluster-docs/deploys/65f2c9046741ce0008039639

@@ -53,14 +53,18 @@ func SyncKubernetesService(
return err
}

// detect if cluster ips changed
clusterIPsChanged := vObj.Spec.ClusterIP != pObj.Spec.ClusterIP || !equality.Semantic.DeepEqual(vObj.Spec.ClusterIPs, pObj.Spec.ClusterIPs)
Copy link
Contributor

Choose a reason for hiding this comment

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

could we use slices.Equal here instead maybe since clusterIPs is just []string ?
We don't need to check the family policy here because it's a 1 to 1 relationship with the clusterIPs slice right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, do you know what would happen if we go from PreferDualStack to RequireDualStack ? That may be worth to include it in the condition

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense :) pushed!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO not important to sync as we copy the ClusterIPs, only the ClusterIPs depend on this. May be best to future proof anyway depending if anything else starts to depend on this, hmm. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, it currently seems to update. I'm not sure why...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

checking

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like it's because something resets the ports before we update it here when the syncer starts. I think think the IPFamilyPolicy only really needs to sync if the ClusterIPs change so I think this is fine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That something is probably the controller-manager that also owns this service, but does not update it

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
@FabianKramm FabianKramm merged commit 245784c into loft-sh:main Mar 14, 2024
69 checks passed
@rohantmp rohantmp deleted the fixDualStack branch March 14, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doesn't work out of the box with dual stack
3 participants