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

Ability to use specific annotations with specific edns instance #5061

Open
lexfrei opened this issue Feb 4, 2025 · 2 comments
Open

Ability to use specific annotations with specific edns instance #5061

lexfrei opened this issue Feb 4, 2025 · 2 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@lexfrei
Copy link

lexfrei commented Feb 4, 2025

What would you like to be added:
An option to mark annotations to be used with specific instance of edns.

Why is this needed:
In some cases, we need to use not just multiple providers, but different targets in each.
For example, I wanna create public dns and private dns for the same ingress to simplify routing.
Currently, I have these annotations:

    external-dns.alpha.kubernetes.io/target: "uuid.cfargotunnel.com"
    external-dns.alpha.kubernetes.io/cloudflare-proxied: "true"

but in the future I wanna use it like this:

    external-dns.alpha.kubernetes.io/target-cf: "uuid.cfargotunnel.com"
    external-dns.alpha.kubernetes.io/cloudflare-proxied-cf: "true"

    # or completely remove this to use ip from ingress status
    external-dns.alpha.kubernetes.io/target-local: "10.0.66.6"

Not just postfix can be used. The domain customization or prefix is fine too.

This looks very useful for multi instance usage of edns

@lexfrei lexfrei added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 4, 2025
@ivankatliarchuk
Copy link
Contributor

You may need to share a bit more details to capture the idea. So you have different instances running one for each provider, what is the setup, which sources do you use, annotation examples?

Do you mind to create a guide for multi instance setup https://github.com/kubernetes-sigs/external-dns/tree/master/docs/tutorials?

@lexfrei
Copy link
Author

lexfrei commented Feb 20, 2025

@ivankatliarchuk, thanks for your feedback. I’d like to provide some additional context to clarify my proposal further.

Right now, I’m not running two separate external-dns deployments—even though I’d like to—because I don’t have a way to differentiate the annotations. The inability to parse custom, provider-specific annotations is a significant blocker for me.

My Current Situation:
• Single Deployment Limitation:
I currently run a single deployment since there’s no mechanism to assign different targets based on provider-specific annotations.
• Desired Setup:
Ideally, I’d like to run separate deployments for each provider (one for Cloudflare and one for Unifi). This way, each deployment would only process the annotations relevant to its provider. For example, I propose using a naming scheme that prepends the provider to the annotation key, such as:
cf.external-dns.alpha.kubernetes.io/target for Cloudflare
unifi.external-dns.alpha.kubernetes.io/target for Unifi

Why This Matters:

In my environment, Traefik is used to manage various endpoints based on specific routing rules. This approach lets me avoid the traditional method of running separate nginx-ingress instances for every case. I have endpoints that serve internal network requests (for Unifi) and an endpoint that manages a Cloudflare tunnel. With the proposed annotation mechanism, I could simply annotate my Ingress resources to automatically create both DNS records—one for the internal office and one for public access—without conflicting configurations.

I hope this additional detail clarifies my proposal. The current inability to parse custom annotations for different deployments is a blocker for me, and addressing it would greatly improve flexibility in multi-provider environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants