cluster-api-provider-hetzner icon indicating copy to clipboard operation
cluster-api-provider-hetzner copied to clipboard

HCloudMachineTemplate and ipv6 not working

Open erkules opened this issue 11 months ago • 4 comments
trafficstars

/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):

erkules avatar Dec 03 '24 03:12 erkules

We use the hcloud-go provider for this: https://github.com/syself/cluster-api-provider-hetzner/blob/c6cab3c53bc89782018698a8aec98575a52c3879/pkg/services/hcloud/server/server.go#L379

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?

janiskemper avatar Dec 03 '24 09:12 janiskemper

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?

erkules avatar Dec 03 '24 13:12 erkules

@apricote do you know?

janiskemper avatar Dec 03 '24 13:12 janiskemper

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

https://github.com/syself/cluster-api-provider-hetzner/blob/c6cab3c53bc89782018698a8aec98575a52c3879/pkg/services/hcloud/server/server.go#L463-L466

apricote avatar Dec 10 '24 09:12 apricote