kubernetes-sigs / external-dns

Configure external DNS servers (AWS Route53, Google CloudDNS and others) for Kubernetes Ingresses and Services
Apache License 2.0
7.46k stars 2.52k forks source link

Custom TTL not working for Route53 records #4292

Open brizaldi opened 4 months ago

brizaldi commented 4 months ago

What happened: I believe someone already reported it before #2271 , but it got no traction and the bot marked it as resolved.

But this issue still occurs in my environment; in the Ingress, I have set it to 60, but in Route 53, it still remains set to the default value of 300.

What you expected to happen: When I set external-dns.alpha.kubernetes.io/ttl: "60", the value in Route 53 should change to 60.

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

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: echoserver
  namespace: nm-001
  annotations:
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/target-type: ip
    external-dns.alpha.kubernetes.io/aws-weight: "0"
    external-dns.alpha.kubernetes.io/set-identifier: green-echoserver
    external-dns.alpha.kubernetes.io/ttl: "1m"
spec:
  ingressClassName: alb
  rules:
    - host: "*.mydomain.com"
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: echoserver
                port:
                  number: 8080

Environment:

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

juanfe2793 commented 1 month ago

/remove-lifecycle stale

hongbo-miao commented 3 weeks ago

Met same issue external-dns.alpha.kubernetes.io/ttl: "180", it does not update. Route 53 is still using default 300 seconds. 😔

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: hm-airbyte-ingress
  namespace: production-hm-airbyte
  annotations:
    kubernetes.io/ingress.class: traefik
    # https://doc.traefik.io/traefik/routing/providers/kubernetes-ingress/#on-ingress
    traefik.ingress.kubernetes.io/router.entrypoints: websecure
    traefik.ingress.kubernetes.io/router.tls: "true"
    # https://kubernetes-sigs.github.io/external-dns/latest/annotations/annotations
    external-dns.alpha.kubernetes.io/hostname: hm-airbyte.hongbomiao.com
    external-dns.alpha.kubernetes.io/ttl: "180"
    # https://cert-manager.io/docs/usage/ingress/#supported-annotations
    cert-manager.io/cluster-issuer: production-lets-encrypt-cluster-issuer
    # https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks
    argocd.argoproj.io/hook: PostSync
  labels:
    app.kubernetes.io/name: hm-airbyte-ingress
    app.kubernetes.io/part-of: production-hm-airbyte
spec:
  rules:
    - host: hm-airbyte.hongbomiao.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: hm-airbyte-airbyte-webapp-svc
                port:
                  number: 80
  tls:
    - hosts:
        - hm-airbyte.hongbomiao.com
      secretName: production-hm-airbyte-certificate