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

feat: automatically set dns service address #618

Merged
merged 3 commits into from
Oct 27, 2024

Conversation

prometherion
Copy link
Member

@prometherion prometherion commented Oct 26, 2024

Closes #468, pinging the main stakeholder such as @kvaps and the IPv6 gurus @johannwagner @hexchen

When defining a different Service CIDR and an empty DNS Service one, Kamaji will automatically compute the correct value.

Once applying this Tenant Control Plane snippet:

  networkProfile:
    serviceCidr: 10.20.0.0/16
    port: 6443

This is the resulting one stored in the cluster.

  networkProfile:
    clusterDomain: cluster.local
    dnsServiceIPs:
    - 10.20.0.10
    podCidr: 10.244.0.0/16
    port: 6443
    serviceCidr: 10.20.0.0/16

Tested also with IPv6:

  networkProfile:
    serviceCidr: 2002::1234:abcd:ffff:c0a8:101/64
    port: 6443

Defaulted values:

    version: v1.30.0
  networkProfile:
    clusterDomain: cluster.local
    dnsServiceIPs:
    - 2002::1234:abcd:ffff:c0a8:111
    podCidr: 10.244.0.0/16
    port: 6443
    serviceCidr: 2002::1234:abcd:ffff:c0a8:101/64

Copy link

netlify bot commented Oct 26, 2024

Deploy Preview for kamaji-documentation ready!

Name Link
🔨 Latest commit e1245d4
🔍 Latest deploy log https://app.netlify.com/sites/kamaji-documentation/deploys/671e08f5b1f4ac00085b2ae1
😎 Deploy Preview https://deploy-preview-618--kamaji-documentation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@johannwagner
Copy link
Contributor

Hey, thanks a lot for this fix.
The IPv6 given service CIDR look wrong, I would expect something like 2001:db8:abcd:efgh::/64 as CIDR with 2001:db8:abcd:efgh::10 as DNS IP.

@prometherion
Copy link
Member Author

prometherion commented Oct 26, 2024

Are you sure the 2001:db8:abcd:efgh:: address is correct? I'm getting a network validation error.

Also, I'm a bit confused: why 10 instead of a? If I understood correctly, the octet is way bigger in IPv6, so 010 in IPv4 would be translated into 000a in IPv6.

Ok, maybe I'm getting your point: in IPv4 we can expect a +10 bit in the last octet, and +16 in IPv6?

@johannwagner
Copy link
Contributor

Whoopsie, I fucked up the example. 2001:db8:abcd::/64 is correct. The other one also has host bits set, which is not correct.

I guess so, they specify :10 as DNS address, which is 16 bits added to the network address.

@prometherion
Copy link
Member Author

Thanks, I added the required changes, such as:

  • adding 10 bit for IPv4
  • adding 16 bits for IPv6

I updated the initial comment on the issue just for reference.

@prometherion prometherion merged commit 7c0eb8d into clastix:master Oct 27, 2024
10 checks passed
@prometherion prometherion deleted the issues/468 branch October 27, 2024 09:55
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.

Automatically set dns service address
2 participants