Skip to content

Unnecessary repeat changes due to Provider-Specific properties handling #6217

@farodin91

Description

@farodin91

What happened:
When using external-dns with multiple provider-specific annotations on a Kubernetes service, the shouldUpdateProviderSpecific logic fails to filter out properties for other providers. This leads to unnecessary repeat changes and, in the case of coredns, can cause an infinite loop of service creation in etcd due to incorrect prefix recovery.

What you expected to happen:

  • Only provider-specific properties relevant to the currently configured provider should be considered for updates.
  • The original prefix should be recovered correctly, preventing infinite loops.

How to reproduce it (as minimally and precisely as possible):

  1. Deploy external-dns with the coredns provider.
  2. Create a Kubernetes service with annotations for multiple providers, e.g.:
    metadata:
      annotations:
        external-dns.alpha.kubernetes.io/aws-evaluate-target-health: "true"
        external-dns.alpha.kubernetes.io/coredns-group: "my-group"
  3. Observe that only the coredns-group property is stored in etcd.
  4. On subsequent reconciliations, shouldUpdateProviderSpecific returns false for all provider-specific properties, causing repeat updates.
  5. For coredns, this also results in the original prefix not being recovered correctly, leading to infinite service creation in etcd.

Anything else we need to know?:

https://github.com/kubernetes-sigs/external-dns/blob/master/plan/plan.go#L299

Environment:

  • External-DNS version (use external-dns --version): 0.20.0
  • DNS provider: coredns
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions