-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
What would you like to be added:
The AWS Load Balancer Controller now supports being able to define and manage an AWS Global Accelerator resource automatically, however there appears to be no way to get external-dns to see that hostname and use it instead of the ALB hostname without manually defining external-dns.alpha.kubernetes.io/target, which is obviously not fault tolerant in case the accelerator ever gets replaced.
In our particular use case, we have an Istio Gateway resource that points to an Ingress resource, which external-dns uses to find the associated hostname.
Ideally, we'd be able to add an annotation that references the <namespace>/<name> of a GlobalAccelerator resource, such that external-dns uses that instead of the ALB name.
This is a simple example of a GlobalAccelerator resource:
apiVersion: aga.k8s.aws/v1beta1
kind: GlobalAccelerator
metadata:
name: accelerator
namespace: infrastructure
spec:
name: accelerator
ipAddressType: IPV4
listeners:
- protocol: TCP
portRanges:
- fromPort: 80
toPort: 80
- fromPort: 443
toPort: 443
clientAffinity: SOURCE_IP
endpointGroups:
- endpoints:
- type: Ingress
name: istio-external
namespace: infrastructure
When deployed, the GlobalAccelerator resource has the following fields that can be read by external-dns:
status:
acceleratorARN: >-
arn:aws:globalaccelerator::xxx:accelerator/xxx
conditions:
- lastTransitionTime: '2026-02-05T16:52:12Z'
message: GlobalAccelerator is ready and available
reason: AcceleratorReady
status: 'True'
type: Ready
dnsName: xxx.awsglobalaccelerator.com
ipSets:
- ipAddressFamily: IPv4
ipAddresses:
- 1.2.3.4
- 5.6.7.8
observedGeneration: 1
status: DEPLOYED
I was thinking perhaps a new annotation can be added to the Ingress that will tell external-dns to look at the accelerator resource for the hostname to use thusly:
annotations:
external-dns.alpha.kubernetes.io/global-accelerator: infrastructure/accelerator
If it is solved this way, it should still work with Istio automatically as hopefully external-dns will follow the external-dns.alpha.kubernetes.io/ingress annotation, see the ingress, find the suggested annotation, then look up that resource to find the appropriate dnsName.
Any more questions please let me know and I'd be happy to provide feedback.