Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override default ExternalDNS target #36

Open
Elegant996 opened this issue Oct 19, 2022 · 8 comments
Open

Override default ExternalDNS target #36

Elegant996 opened this issue Oct 19, 2022 · 8 comments

Comments

@Elegant996
Copy link

Elegant996 commented Oct 19, 2022

For our environment, we are always using a CNAME on the base domain instead of the status.loadbalancer.IP from the traefik service. Would it be possible to add an override for all ExternalDNS targets similar to how we must pick an Issuer for cert-manager when deploying switchboard?

@borchero
Copy link
Owner

Could you provide a more tangible example and maybe a sample of the resource that is currently created and how you want it to look like? 😄

@Elegant996
Copy link
Author

Elegant996 commented Oct 24, 2022

Sure, see the ingress below:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: test
  annotations:
    external-dns.alpha.kubernetes.io/target: example.com
spec:
  rules:
  - host: test.example.com
    http:
      paths:
      - path: /
        pathType: ImplementationSpecific
        backend:
          service:
            name: test
            port:
              name: https
  tls:
  - hosts:
    - test.example.net
    secretName: test-example-tls

ExternalDNS would generate a CNAME entry for test.example.com that points to example.com.

In our use case, all ingresses would use example.com as the target and never the loadbalancer IP since it is an internal address. Ideally, we would be able to define a default target similar to the certificate template but for DNS:

certificateTemplate:
  spec:
    issuerRef:
      name: letsencrypt-prod
      kind: ClusterIssuer

Thanks!

@borchero
Copy link
Owner

Would this use case be covered if integrations.externalDNS.targetIPs (or a similarly named option) would allow setting hostnames?

@Elegant996
Copy link
Author

Yes! That would do perfectly. Perhaps it may be more prudent to just call it integrations.externalDNS.target similar to ExternalDNS and just have that list support IP or hostnames?

@borchero
Copy link
Owner

@Elegant996 do you want to take a stab at that? 😄 might take me some time to find time for this otherwise 👀

@Elegant996
Copy link
Author

@borchero Actually, this might not be an issue if kubernetes-sigs/external-dns#3055 is accepted. I'll leave this here for now but the PR may affect half of this project.

@borchero
Copy link
Owner

borchero commented Nov 3, 2022

Oh nice, that would be cool 😄 historically, external-dns was rather reluctant to include support for anything ither than the native ingress but let’s see how it turns out this time 😄

@beezel
Copy link

beezel commented Apr 21, 2023

Giving this a bump as being able to use our NLBs hostname for TargetIP would be an ideal solution for our environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants