cryostat-operator icon indicating copy to clipboard operation
cryostat-operator copied to clipboard

Agent Autoconfig callback is not IPv6 ready

Open andrewazores opened this issue 5 months ago • 1 comments

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]).

andrewazores avatar Jul 04 '25 19:07 andrewazores

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.

ebaron avatar Aug 28 '25 17:08 ebaron