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

Trying to recreate the record when external-dns.alpha.kubernetes.io/target: <somevalue> is used #5007

Open
hussainbani opened this issue Jan 15, 2025 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@hussainbani
Copy link

hussainbani commented Jan 15, 2025

When trying to create an ingress with external-dns.alpha.kubernetes.io/target: <somevalue> in azure private dns, it keep on updating the record.

Example Config:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    kubernetes.io/private-external-dns: "true"
    external-dns.alpha.kubernetes.io/target: <somevalue>`
  generation: 4
  name: nginx1
  namespace: default
spec:
  rules:
  - host: ingresstest.example.com
    http:
      paths:
      - backend:
          service:
            name: nginx-svc-1
            port:
              number: 80
        path: /
        pathType: Prefix
  tls:
  - hosts:
    - ingresstest.example.com
status:
  loadBalancer:
    ingress:
    - ip: 10.X.X.X

Logs:

time="2025-01-15T21:08:09Z" level=debug msg="Endpoints generated from ingress: default/nginx1: [ingresstest.example.com 300 IN CNAME  google.com []]"
time="2025-01-15T21:08:09Z" level=debug msg="Received 6 changes to process"
time="2025-01-15T21:08:09Z" level=debug msg="Retrieving Azure Private DNS zones for Resource Group 'rg-weu-poc-global-01'"
time="2025-01-15T21:08:09Z" level=debug msg="Validating Zone: example.com"
time="2025-01-15T21:08:09Z" level=debug msg="Found 1 Azure Private DNS zone(s). Updating zones cache"
time="2025-01-15T21:08:09Z" level=debug msg="Records to be deleted: 0"
time="2025-01-15T21:08:09Z" level=debug msg="Records to be updated: 1"
time="2025-01-15T21:08:09Z" level=info msg="Updating CNAME record named 'ingresstest' to 'google.com' for Azure Private DNS zone 'example.com'."
time="2025-01-15T21:08:10Z" level=info msg="Updating TXT record named 'ingresstest' to '\"heritage=external-dns,external-dns/owner=default,external-dns/resource=ingress/default/nginx1\"' for Azure Private DNS zone 'example.com'."
time="2025-01-15T21:08:10Z" level=error msg="Failed to update TXT record named 'ingresstest' to '\"heritage=external-dns,external-dns/owner=default,external-dns/resource=ingress/default/nginx1\"' for Azure Private DNS zone 'example.com': PUT https://management.azure.com/subscriptions/6c69a917-9508-4ed9-b66c-552409d7c1c6/resourceGroups/rg-weu-poc-global-01/providers/Microsoft.Network/privateDnsZones/example.com/TXT/ingresstest\n--------------------------------------------------------------------------------\nRESPONSE 409: 409 Conflict\nERROR CODE: Conflict\n--------------------------------------------------------------------------------\n{\n  \"code\": \"Conflict\",\n  \"message\": \"The record could not be created because a CNAME record with the same name already exists in this zone.\",\n  \"details\": [\n    {\n      \"code\": \"CannotCreateRecordDueToCNameNamingRestriction\",\n      \"message\": \"The record could not be created because a CNAME record with the same name already exists in this zone.\"\n    }\n  ]\n}\n--------------------------------------------------------------------------------\n"

@hussainbani hussainbani added the kind/bug Categorizes issue or PR as related to a bug. label Jan 15, 2025
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

1 participant