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

HCloudMachineTemplate and ipv6 not working #1514

Open
erkules opened this issue Dec 3, 2024 · 4 comments
Open

HCloudMachineTemplate and ipv6 not working #1514

erkules opened this issue Dec 3, 2024 · 4 comments

Comments

@erkules
Copy link

erkules commented Dec 3, 2024

/kind bug

What steps did you take and what happened:
I was trying to deploy ipv6 only machines.

apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: HCloudMachineTemplate
metadata:
  name: name-md-0
spec:
  template:
    spec:
      publicNetwork:
        enableIPv4:   false
        enableIPv6:   true

What did you expect to happen:
I was expecting ipv6 only machines

Anything else you would like to add:
nothing

Environment:

  • cluster-api-provider-hetzner version: caph:v1.0.0
  • Kubernetes version: 1.30.1
  • OS (e.g. from /etc/os-release):
@janiskemper
Copy link
Contributor

We use the hcloud-go provider for this:

EnableIPv6: s.scope.HCloudMachine.Spec.PublicNetwork.EnableIPv6,

There is no more logic involved in CAPH to control this. Maybe you can explain a bit more what happens, so that the root cause of your problem is easier to find?

@erkules
Copy link
Author

erkules commented Dec 3, 2024

I use the setting you see above. The machines are created but also with a ipv4 interface.
That's all. I had the impression this is sufficient to tell hetzner to create machines without ipv4.
Or do I need to fulfill more requirements?

@janiskemper
Copy link
Contributor

@apricote do you know?

@apricote
Copy link
Contributor

This IPv4 is always enabled if the cluster does not use private networks, maybe thats the cause?

// if no private network exists, there must be an IPv4 for the load balancer
if !s.scope.HetznerCluster.Spec.HCloudNetwork.Enabled {
opts.PublicNet.EnableIPv4 = true
}

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

No branches or pull requests

3 participants