rancher / k3k

Kubernetes in Kubernetes
Apache License 2.0
131 stars 21 forks source link

Server ingress fails to create with ipv6 address for host #101

Open jakefhyde opened 4 months ago

jakefhyde commented 4 months ago

If the node address is an ipv6 address, the ingress creation will fail with the following error:

E0415 19:31:00.958157       1 util.go:32] failed to create server ingress: Ingress.extensions "k3kcontrolplane-sample-sm2k9-server-ingress" is invalid: spec.rules[0].host: Invalid value: "k3kcontrolplane-sample-sm2k9.fc00:f853:ccd:e793::2.sslip.io": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
E0415 19:31:00.958169       1 util.go:32] failed to create cluster: Ingress.extensions "k3kcontrolplane-sample-sm2k9-server-ingress" is invalid: spec.rules[0].host: Invalid value: "k3kcontrolplane-sample-sm2k9.fc00:f853:ccd:e793::2.sslip.io": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

https://sslip.io does support ipv6 addresses, but : has to be replaced with -.