Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
fix(#629): Ensure address type is set correctly for both Hostname and…
Browse files Browse the repository at this point in the history
… IPAddress MGC types.
  • Loading branch information
mikenairn committed Oct 19, 2023
1 parent d237228 commit d53d848
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/controllers/dnspolicy/dnspolicy_dnsrecords.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d53d848

Please sign in to comment.