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

Owner label not being properly applied which prevents deletions #1014

Closed
leyshon opened this issue May 3, 2019 · 2 comments
Closed

Owner label not being properly applied which prevents deletions #1014

leyshon opened this issue May 3, 2019 · 2 comments

Comments

@leyshon
Copy link

leyshon commented May 3, 2019

I'm using external-dns in Azure AKS and with Azure DNS. It successfully creates records for me but is unable to delete them if I later delete the ingress. I've started with an empty zone and allowed external-dns to create the txt record and a cname. The logs show that the owner information is missing which is why the delete fails but I don't know why the owner information isn't coming through properly.

I'm running external-dns with --registry txt --txt-owner-id k8sCluster --txt-prefix k8sCluster
Version: v0.5.13

time="2019-05-03T11:55:31Z" level=debug msg="Retrieving Azure DNS zones."
time="2019-05-03T11:55:32Z" level=debug msg="Found 1 Azure DNS zone(s)."
time="2019-05-03T11:55:32Z" level=info msg="Updating CNAME record named 'test2' to 'k8s-test1.trafficmanager.net' for Azure DNS zone 'dev.example.net'."
time="2019-05-03T11:55:33Z" level=info msg="Updating TXT record named 'k8sCluster-test2' to '\"heritage=external-dns,external-dns/owner=k8sCluster,external-dns/resource=ingress/dev/helloworld\"' for Azure DNS zone 'dev.example.net'."
...
...
time="2019-05-03T12:05:48Z" level=debug msg="Found TXT record for 'k8scluster-test2.dev.example.net' with target '\"heritage=external-dns,external-dns/owner=k8sCluster,external-dns/resource=ingress/dev/helloworld\"'."
time="2019-05-03T12:05:48Z" level=debug msg="Found CNAME record for 'test2.dev.example.net' with target 'k8s-test1.trafficmanager.net'."
time="2019-05-03T11:05:48Z" level=debug msg="Skipping endpoint test2.dev.example.net 300 IN CNAME k8s-test1.trafficmanager.net [] because owner id does not match, found: \"\", required: \"k8sCluster\""

The ingress I've tried this with is as follows

kind: Ingress
metadata:
  annotations:
    external-dns.alpha.kubernetes.io/target: k8s-test1.trafficmanager.net
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /$1
  creationTimestamp: "2019-05-03T08:23:03Z"
  name: helloworld
  namespace: dev
spec:
  rules:
  - host: test2.dev.example.net
    http:
      paths:
      - backend:
          serviceName: helloworld
          servicePort: 80
        path: /?(.*)
@Evesy
Copy link
Contributor

Evesy commented May 7, 2019

@leyshon Could you try setting TXT owner (and probably TXT prefix just to be safe) to be lowercase as per #1012?

@leyshon
Copy link
Author

leyshon commented May 8, 2019

Thanks, that is indeed my problem and setting the values to be lowercase solves it

@leyshon leyshon closed this as completed May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants