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

NS record not being created via CRD #4831

Open
drew-viles opened this issue Oct 25, 2024 · 2 comments · May be fixed by #4882
Open

NS record not being created via CRD #4831

drew-viles opened this issue Oct 25, 2024 · 2 comments · May be fixed by #4882
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@drew-viles
Copy link

What happened:
I'm trying to create an NS record as advised via the docs here.
Here is my resource (redacted of course):

apiVersion: externaldns.k8s.io/v1alpha1
kind: DNSEndpoint
metadata:
  name: infer-dns-ns
  namespace: infer-dns
spec:
  endpoints:
  - dnsName: some-domain.example.com
    recordTTL: 300
    recordType: NS
    targets:
    - ns1.delegation.example.com

When I deploy this, nothing happens. The logs state msg="All records are already up to date". I have the --source=crd set too which I have validated as working by adjusting my DNSEndpoint to test it - for example, this works:

apiVersion: externaldns.k8s.io/v1alpha1
kind: DNSEndpoint
metadata:
  name: infer-dns-ns
  namespace: infer-dns
spec:
  endpoints:
  - dnsName: some-domain.example.com
    recordTTL: 300
    recordType: A
    targets:
    - 0.0.0.0

What you expected to happen:
The NS record should be created as per the docs.

How to reproduce it (as minimally and precisely as possible):
Just deploy external dns via the helm chart with the following values:

releaseName: external-dns
values: |
  env:
    - name: "CF_API_TOKEN"
      valueFrom:
        secretKeyRef:
          key:  api-key
          name: cloudflare-api-key-secret
  txtOwnerId: mgmt
  txtPrefix: "mgmt-"
  domainFilters:
    - example.com
  sources:
    - service
    - ingress
    - crd
  extraArgs:
    - "--label-filter=external-dns-exclude notin (true)"
  provider: "cloudflare"
  policy: sync

Anything else we need to know?:

I've tried ensuring it isn't some bug around the --label-filter by removing it and also trying it with the label external-dns-exclude: "false" but again, same result of a noop.

Environment:

  • External-DNS version: 1.15.0:
  • DNS provider: Cloudflare
  • Others:
@drew-viles drew-viles added the kind/bug Categorizes issue or PR as related to a bug. label Oct 25, 2024
@juan-vg
Copy link

juan-vg commented Nov 18, 2024

Hey @drew-viles, I discovered the fix:

  extraArgs:
    - ...
    - --managed-record-types=A
    - --managed-record-types=AAAA
    - --managed-record-types=CNAME
    - --managed-record-types=NS

By default the managed types are A, AAAA and CNAME, so any other type must be explicitly defined to be allowed. I believe the problem here are the docs, since for many providers this is not specified. I found the useful info at the PowerDNS docs, and that's not even mentioned for other providers like AWS or Cloudflare.

@juan-vg juan-vg linked a pull request Nov 18, 2024 that will close this issue
2 tasks
@drew-viles
Copy link
Author

aaah nice spot. thanks for confirming and for raising the PR for the docs clarification.

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

Successfully merging a pull request may close this issue.

2 participants