update istio gateway ingress source annotation constant

This commit is contained in:
David Pait 2023-08-08 08:28:39 -04:00
parent cb2772c6ae
commit 08b592d2fd
2 changed files with 4 additions and 4 deletions

View File

@ -263,7 +263,7 @@ func (sc *gatewaySource) targetsFromGateway(ctx context.Context, gateway *networ
return return
} }
ingressStr, found := gateway.Annotations[IstioIngressBackedGateway] ingressStr, found := gateway.Annotations[IstioGatewayIngressSource]
if found && ingressStr != "" { if found && ingressStr != "" {
targets, err = sc.targetsFromIngress(ctx, ingressStr, gateway) targets, err = sc.targetsFromIngress(ctx, ingressStr, gateway)
return return

View File

@ -42,9 +42,9 @@ import (
// IstioMeshGateway is the built in gateway for all sidecars // IstioMeshGateway is the built in gateway for all sidecars
const IstioMeshGateway = "mesh" const IstioMeshGateway = "mesh"
// IstioIngressBackedGateway is used to determine if the gateway is implemented by an Ingress object // IstioGatewayIngressSource is the annotation used to determine if the gateway is implemented by an Ingress object
// instead of a standard LoadBalancer service type // instead of a standard LoadBalancer service type
const IstioIngressBackedGateway = "external-dns.alpha.kubernetes.io/ingress" const IstioGatewayIngressSource = "external-dns.alpha.kubernetes.io/ingress"
// virtualServiceSource is an implementation of Source for Istio VirtualService objects. // virtualServiceSource is an implementation of Source for Istio VirtualService objects.
// The implementation uses the spec.hosts values for the hostnames. // The implementation uses the spec.hosts values for the hostnames.
@ -479,7 +479,7 @@ func (sc *virtualServiceSource) targetsFromGateway(ctx context.Context, gateway
return return
} }
ingressStr, found := gateway.Annotations[IstioIngressBackedGateway] ingressStr, found := gateway.Annotations[IstioGatewayIngressSource]
if found && ingressStr != "" { if found && ingressStr != "" {
targets, err = sc.targetsFromIngress(ctx, ingressStr, gateway) targets, err = sc.targetsFromIngress(ctx, ingressStr, gateway)
return return