cryostat-operator
cryostat-operator copied to clipboard
Agent Autoconfig callback is not IPv6 ready
https://github.com/cryostatio/cryostat-operator/blob/088ffea7b12635919d26459942f583587b60b7e5/internal/webhooks/agent/pod_defaulter.go#L465
The callback hostname fallback for the Pod IP assumes an IPv4 address. It should check if the Pod IP is IPv4 or IPv6 address and handle these accordingly. The transformation for IPv6 addresses to hostnames should probably just be to enclose the address in square brackets ([1:2:3:4]).
Looks like support for this in CoreDNS just landed: https://github.com/coredns/coredns/commit/1025a199e99a11049f7939b3db127da4153ba201. The hostname seems to be constructed the same way as IPv4, only instead of replacing dots in replaces colons.