borchero / switchboard

Kubernetes Operator for Automatically Issuing DNS Records and TLS Certificates for Traefik Ingress Routes.
MIT License
155 stars 15 forks source link

Copy annotations from IngressRoute to DNSEndpoint #58

Closed dustinrouillard closed 1 year ago

dustinrouillard commented 1 year ago

Motivation

External DNS has a Cloudflare provider and when using it you can add external-dns.alpha.kubernetes.io/cloudflare-proxied to the DNSEndpoint to have it create the DNS record non-proxied (or proxied if you have it globally default to no proxy), and Switchboard doesn't copy the annotations down to the created resource.

Explanation

This PR puts the annotations from the IngressRoute on the created DNSEndpoint resource, might be worth it in the future to have a list of annotations to copy instead of all of them.

Changes

Added the Annotations field to the struct returned from the objectMeta method in the externaldns integration.

borchero commented 1 year ago

Sorry this took so long, I was on vacation! 😄