external-dns icon indicating copy to clipboard operation
external-dns copied to clipboard

Allow global configuration of TTL

Open rickardp opened this issue 4 years ago • 31 comments

What would you like to be added: Currently, at least for Azure, the TTL is hard coded to 300 seconds. It is possible to override this per endpoint but it would be very useful to set the default ttl on the external-dns service itself.

Why is this needed: We want to use the concept of "convention over configuration" and since we need to lower the TTL we do not want to explicitly do so in all the ingresses we define, but rather define this centrally for our cluster. The hard coded value of 300 seconds means that clients sometimes cache invalid responses for up to 5 minutes, which is unacceptable in our situation.

rickardp avatar Oct 20 '20 13:10 rickardp

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Jan 18 '21 13:01 fejta-bot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten

fejta-bot avatar Feb 17 '21 14:02 fejta-bot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-contributor-experience at kubernetes/community. /close

fejta-bot avatar Mar 19 '21 15:03 fejta-bot

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-contributor-experience at kubernetes/community. /close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Mar 19 '21 15:03 k8s-ci-robot

/reopen

pavlo-bondarenko avatar Jul 14 '21 11:07 pavlo-bondarenko

@pavlo-bondarenko: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Jul 14 '21 11:07 k8s-ci-robot

@rickardp could you please reopen it?

pavlo-bondarenko avatar Jul 14 '21 11:07 pavlo-bondarenko

/reopen

rickardp avatar Jul 14 '21 12:07 rickardp

@rickardp: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Jul 14 '21 12:07 k8s-ci-robot

/remove-lifecycle rotten

pavlo-bondarenko avatar Jul 16 '21 07:07 pavlo-bondarenko

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

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

k8s-triage-robot avatar Oct 14 '21 08:10 k8s-triage-robot

/remove-lifecycle stale

olfway avatar Oct 14 '21 09:10 olfway

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

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

k8s-triage-robot avatar Jan 12 '22 09:01 k8s-triage-robot

/remove-lifecycle stale

olfway avatar Jan 12 '22 09:01 olfway

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

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

k8s-triage-robot avatar Apr 12 '22 10:04 k8s-triage-robot

/remove-lifecycle stale

pavlo-bondarenko avatar Apr 12 '22 12:04 pavlo-bondarenko

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

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

k8s-triage-robot avatar Jul 11 '22 13:07 k8s-triage-robot

/remove-lifecycle stale

olfway avatar Jul 11 '22 13:07 olfway

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

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

k8s-triage-robot avatar Oct 09 '22 13:10 k8s-triage-robot

/remove-lifecycle stale

pavlo-bondarenko avatar Oct 11 '22 08:10 pavlo-bondarenko

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

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

k8s-triage-robot avatar Jan 09 '23 08:01 k8s-triage-robot

/remove-lifecycle stale

pavlo-bondarenko avatar Jan 10 '23 09:01 pavlo-bondarenko

I'd like this feature too as I currently have to apply the annotation to all ingresses and would be much easier to enforce it at controller level - I was thinking of enforcing the annotation via gatekeeper for now so that it can be removed from deployments but still get applied.

mateuszdrab avatar Feb 04 '23 10:02 mateuszdrab

Honestly, it's a bit frustrating to see that things like PiHole support are added but this issue and https://github.com/kubernetes-sigs/external-dns/pull/2054 remain unaddressed for almost 2 years!

mateuszdrab avatar Feb 06 '23 18:02 mateuszdrab

Here is a gatekeeper policy that sort of acts like a global default TTL, it will create an annotation if missing but not touch existing ones as by design gatekeeper can't overwrite any metadata. Make sure to adjust kinds if needed to enforce this on services and change 86400 to your preference...

apiVersion: mutations.gatekeeper.sh/v1
kind: AssignMetadata
metadata:
  name: assign-external-dns-ttl-annotation-on-ingress
spec:
  match:
    scope: Namespaced
    kinds:
      - apiGroups: ["extensions", "networking.k8s.io"]
        kinds: ["Ingress"]
  location: "metadata.annotations.'external-dns.alpha.kubernetes.io/ttl'"
  parameters:
    assign:
      value: "86400"

mateuszdrab avatar Feb 07 '23 14:02 mateuszdrab

also interested in that feature

mblaschke-daimlertruck avatar May 02 '23 13:05 mblaschke-daimlertruck

I'd be interested to pick this up, but how do you imagine it would work?

Some providers may have a minimum TTL, some don't allow 0, some hardcode it, etc. Would a "global" configuration override provider default values? What if that is not supported by the provider, i.e. they do not accept records with TTL less than X? Such configuration value may cause chaos and introduce inconsitent behaviour across the cluster, so would be good if we could hash out the expected behaviour before jumping into the code.

romantomjak avatar Nov 01 '23 20:11 romantomjak

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

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

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

k8s-triage-robot avatar Jan 31 '24 15:01 k8s-triage-robot

/remove-lifecycle stale

mlazowik avatar Feb 01 '24 15:02 mlazowik

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

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

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

k8s-triage-robot avatar May 01 '24 15:05 k8s-triage-robot