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

External DNS created other TXT Records starts with a-, and the records were not cleanly deleted causing CrashLoopBackoff #4880

Open
kachi-app opened this issue Nov 18, 2024 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@kachi-app
Copy link

kachi-app commented Nov 18, 2024

What happened:

  1. External DNS created additional TXT Records starts with a-. I.E: service-a.example.com. it will create 2 TXT records with name a-service-a.example.com, and service-a.example.com.
  2. With sync policy, some records were left behind when deleted, and causing CrashLoopBackoff on the pods.
  3. Multiple DNS Zones Filter, causing some records inconsistently inserted between public and private domains. I try to use external-dns.alpha.kubernetes.io/access: public, it doesn't works.

What you expected to happen:
each TXT should be created once. When deleted, all records should be recorded.

How to reproduce it (as minimally and precisely as possible):
It happens to me when I try to install bitnami kafka

# Bitnami/kafka values.yaml
    externalAccess:
      enabled: true
      controller:
        service:
          annotations:
            external-dns.alpha.kubernetes.io/hostname: "{{ .targetPod }}.example.com"
          type: LoadBalancer
          loadBalancerNames:
            - kafka-main-controller-0.example.com
            - kafka-main-controller-1.example.com
            - kafka-main-controller-2.example.com
# external DNS Config

    provider: google
    google:
      project: "xxxx"
    serviceAccount:
      annotations:
        iam.gke.io/gcp-service-account: [email protected]
    zoneNameFilters:
      - "public-example"
      - "private-example"
    nodeSelector:
      iam.gke.io/gke-metadata-server-enabled: "true"

    tolerations:
      - key: "role"
        operator: "Equal"
        value: "infra"
        effect: "NoSchedule"

    ## @param policy Modify how DNS records are synchronized between sources and providers (options: sync, upsert-only )
    ## Default: upsert-only
    policy: sync

Anything else we need to know?:

time="2024-11-18T10:18:11Z" level=info msg="Add records: kafka-main-controller-0.example.com. A 300"
time="2024-11-18T10:18:11Z" level=info msg="Add records: kafka-main-controller-2.example.com. A 300"
time="2024-11-18T10:18:11Z" level=info msg="Add records: kafka-main-controller-2.example.com. TXT [\"heritage=external-dns,external-dns/owner=default,external-dns/resource=service/kafka/kafka-main-controller-2-external\"] 300"
time="2024-11-18T10:18:13Z" level=info msg="Change zone: example-zone batch #0"
time="2024-11-18T10:18:13Z" level=info msg="Add records: a-kafka-main-controller-0.example.com. TXT [\"heritage=external-dns,external-dns/owner=default,external-dns/resource=service/kafka/kafka-main-controller-0-external\"] 300"
time="2024-11-18T10:18:13Z" level=info msg="Add records: a-kafka-main-controller-2.example.com. TXT [\"heritage=external-dns,external-dns/owner=default,external-dns/resource=service/kafka/kafka-main-controller-2-external\"] 300"
time="2024-11-18T10:18:13Z" level=info msg="Add records: kafka-main-controller-0.example.com. TXT [\"heritage=external-dns,external-dns/owner=default,external-dns/resource=service/kafka/kafka-main-controller-0-external\"] 300"
time="2024-11-18T10:18:13Z" level=info msg="Add records: kafka-main-controller-1.example.com. A [300"
time="2024-11-18T10:18:13Z" level=info msg="Add records: kafka-main-controller-1.example.com. TXT [\"heritage=external-dns,external-dns/owner=default,external-dns/resource=service/kafka/kafka-main-controller-1-external\"] 300"

Environment:

  • External-DNS version (use external-dns --version): Helm Chart helm.sh/chart=external-dns-8.5.1
  • DNS provider: Google
  • Others:
policy: sync
@kachi-app kachi-app added the kind/bug Categorizes issue or PR as related to a bug. label Nov 18, 2024
@kachi-app kachi-app changed the title External DNS created other TXT Records starts with a-, and the records were not deleted cleanly causing CrashLoopBackoff External DNS created other TXT Records starts with a-, and the records were not cleanly deleted causing CrashLoopBackoff Nov 19, 2024
@aoktox
Copy link

aoktox commented Dec 26, 2024

Regarding multiple TXT records, i think this is not bug, this is expected change introduced in #2157

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

No branches or pull requests

2 participants