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

Add IPv6-only support for moonray #664

Merged
merged 13 commits into from
Sep 18, 2024
Merged

Conversation

bschimke95
Copy link
Contributor

Adds support for IPv6-only support on moonray. For the default k8s-snap this is not yet supported as Cilium loadbalancer does not support IPv6-only.

Most of the changes basically only ensure that the IPv6 address is properly put into brackets. We use different representations of IPs across the codebase (e.g. string, or net.IP or Addr by microcluster) so we cannot just simply use the same approach everywhere.

@bschimke95 bschimke95 requested a review from a team as a code owner September 12, 2024 17:57
@HomayoonAlimohammadi
Copy link
Contributor

We use different representations of IPs across the codebase (e.g. string, or net.IP or Addr by microcluster).

I think this might be a good candidate for improvements later on, to use uniform representations.

@bschimke95
Copy link
Contributor Author

This is not something we directly control as those come from third-parties (e.g. microcluster). Unifying them just to use them once a few lines later in a util does not seem practical to me. That being said, we should definitely do it where applicable.

Copy link
Contributor

@louiseschmidtgen louiseschmidtgen left a comment

Choose a reason for hiding this comment

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

Great work @bschimke95, please have a look at my comments!

src/k8s/pkg/k8sd/api/certificates_refresh.go Show resolved Hide resolved
src/k8s/pkg/k8sd/setup/k8s_apiserver_proxy.go Show resolved Hide resolved
src/k8s/pkg/utils/cidr_test.go Outdated Show resolved Hide resolved
src/k8s/pkg/utils/cidr.go Outdated Show resolved Hide resolved
src/k8s/pkg/k8sd/app/hooks_join.go Show resolved Hide resolved
src/k8s/pkg/k8sd/setup/util_kubeconfig.go Outdated Show resolved Hide resolved
tests/integration/tests/test_util/util.py Show resolved Hide resolved
Copy link
Contributor

@HomayoonAlimohammadi HomayoonAlimohammadi left a comment

Choose a reason for hiding this comment

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

Piece of art, thanks a lot Ben! Really enjoyed the thorough testing.
Left some minor comments (mostly nit)

src/k8s/pkg/utils/cidr.go Outdated Show resolved Hide resolved
src/k8s/pkg/utils/cidr.go Outdated Show resolved Hide resolved
src/k8s/pkg/utils/cidr.go Outdated Show resolved Hide resolved
src/k8s/pkg/utils/cidr.go Outdated Show resolved Hide resolved
src/k8s/pkg/utils/cidr.go Outdated Show resolved Hide resolved
src/k8s/pkg/k8sd/api/certificates_refresh.go Outdated Show resolved Hide resolved
src/k8s/pkg/k8sd/app/hooks_bootstrap.go Outdated Show resolved Hide resolved
src/k8s/pkg/k8sd/app/hooks_join.go Outdated Show resolved Hide resolved
src/k8s/pkg/k8sd/setup/k8s_apiserver_proxy.go Outdated Show resolved Hide resolved
src/k8s/pkg/k8sd/setup/util_kubeconfig.go Outdated Show resolved Hide resolved
Copy link
Member

@berkayoz berkayoz left a comment

Choose a reason for hiding this comment

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

Great work overall, did an initial pass and left some comments

src/k8s/pkg/utils/cidr.go Outdated Show resolved Hide resolved
src/k8s/pkg/k8sd/app/hooks_bootstrap.go Outdated Show resolved Hide resolved
src/k8s/pkg/k8sd/setup/kube_proxy.go Show resolved Hide resolved
@bschimke95
Copy link
Contributor Author

Thanks for all the comments! I refactored this PR a bit to pass down the local address rather then determine it in every function separately.

Copy link
Member

@berkayoz berkayoz left a comment

Choose a reason for hiding this comment

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

LGTM

src/k8s/pkg/k8sd/setup/util_kubeconfig.go Outdated Show resolved Hide resolved
@bschimke95 bschimke95 merged commit e8475bf into main Sep 18, 2024
20 checks passed
@bschimke95 bschimke95 deleted the bschimke95/add-ipv6-only-test branch September 18, 2024 13:04
evilnick pushed a commit to evilnick/k8s-snap that referenced this pull request Nov 14, 2024
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.

4 participants