External-dns: Feature request: Domain filter for Power-DNS provider

Created on 10 May 2018  路  8Comments  路  Source: kubernetes-sigs/external-dns

Hello,

When I am configuring external-dns with some domain filters, I get a fatal exit:

INFO[0000] config: {Master: KubeConfig: Sources:[service ingress] Namespace: AnnotationFilter: FQDNTemplate: CombineFQDNAndAnnotation:false Compatibility: PublishInternal:false Provider:pdns GoogleProject: DomainFilter:[google.com google.com.au] ZoneIDFilter:[] AWSZoneType: AWSAssumeRole: AzureConfigFile:/etc/kubernetes/azure.json AzureResourceGroup: CloudflareProxied:false InfobloxGridHost: InfobloxWapiPort:443 InfobloxWapiUsername:admin InfobloxWapiPassword: InfobloxWapiVersion:2.3.1 InfobloxSSLVerify:true DynCustomerName: DynUsername: DynPassword: DynMinTTLSeconds:0 InMemoryZones:[] PDNSServer:http://10.24.0.250:5553 PDNSAPIKey:changeme Policy:sync Registry:txt TXTOwnerID:keycloak TXTPrefix: Interval:10s Once:false DryRun:false LogFormat:text MetricsAddress::7989 LogLevel:info}
INFO[0000] Connected to cluster at https://10.26.0.1:443
FATA[0000] PDNS Provider does not support domain filter

Would it be possible to implement that feature for Power DNS provider?

Thank you.

Most helpful comment

Started to tackle this. Need to do some testing and add test cases:
https://github.com/kubernetes-incubator/external-dns/compare/master...ottoyiu:pdns-domainfilter

Reading the code, filtering out ListZones will be enough to filter out unwanted ops to powerdns. Though the reason why there are left over endpoints would result in a confusing and unrelated message (ie. missing zone)

All 8 comments

@johnmarcou Thank you for this feature request, it'll take me a while, but this should be doable.

For reference, I would need the domain-filter option to allow external-dns to update some DNS zones, but exclude some others.

My use-case is:

  • DNS zone company.org is managed by DNS-Server-A (no API here, manual updates is required)
  • DNS zone myzone.company.org is managed by DNS-Server-B (PowerDNS)
  • DNS-Server-A is configured to forward myzone.company.org requests to DNS-Server-B
  • Kubernetes hosts services/ingresses for company.org
    We have to apply manual update on DNS-Server-A for these records
  • Kubernetes hosts services/ingresses for myzone.company.org
    We want automatic update to DNS-Server-B for these records

Desired config:

  • External-DNS should be configured to avoid DNS update of company.org to DNS-Server-B
  • External-DNS should be configured to update only myzone.company.org zone on DNS-Server-B

Without this domain-filter option, External-DNS is logging warning"Unable to find company.org zone", every [interval (10s)].

Workaround for now: logLevel = error, to hide these warning messages.

Is there any progress on this? If not, I maybe able to take a look at it and take it on. We have a similar use case as above.

@ottoyiu Unfortunately I haven't been able to work on this, feel free to give this a go, it shouldn't be too hard. Let me know if you have any questions!

Started to tackle this. Need to do some testing and add test cases:
https://github.com/kubernetes-incubator/external-dns/compare/master...ottoyiu:pdns-domainfilter

Reading the code, filtering out ListZones will be enough to filter out unwanted ops to powerdns. Though the reason why there are left over endpoints would result in a confusing and unrelated message (ie. missing zone)

@ottoyiu I'll try to review this over the weekend. Thanks for giving it a go.

@ffledgling it's not quite ready yet. I will submit a PR and ping you when I'm done :)

@ffledgling I opened #737 with the implementation and also opened #736 for a bug I discovered when testing the changes I've done for the domainfilter impl.

Was this page helpful?
0 / 5 - 0 ratings