diff --git a/pkg/controllers/dnspolicy/dnspolicy_dnsrecords.go b/pkg/controllers/dnspolicy/dnspolicy_dnsrecords.go index 5b24b73fb..7899a9d8f 100644 --- a/pkg/controllers/dnspolicy/dnspolicy_dnsrecords.go +++ b/pkg/controllers/dnspolicy/dnspolicy_dnsrecords.go @@ -151,10 +151,13 @@ func (r *DNSPolicyReconciler) buildClusterGateway(ctx context.Context, downstrea } for i, addr := range clusterAddress { - addrType := gatewayv1beta1.IPAddressType - if *addr.Type == gateway.MultiClusterHostnameAddressType { + addrType := *addr.Type + if addrType == gateway.MultiClusterHostnameAddressType { addrType = gatewayv1beta1.HostnameAddressType } + if addrType == gateway.MultiClusterIPAddressType { + addrType = gatewayv1beta1.IPAddressType + } singleClusterAddresses[i] = gatewayv1beta1.GatewayAddress{ Type: &addrType,