kubernetes-sigs / external-dns

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

Allow global configuration of TTL #1829

Open rickardp opened 4 years ago

rickardp commented 4 years ago

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.

fejta-bot commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

k8s-ci-robot commented 3 years ago

@fejta-bot: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/external-dns/issues/1829#issuecomment-802915648): >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](https://github.com/kubernetes/community). >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
pavlo-bondarenko commented 3 years ago

/reopen

k8s-ci-robot commented 3 years ago

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

In response to [this](https://github.com/kubernetes-sigs/external-dns/issues/1829#issuecomment-879814016): >/reopen Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
pavlo-bondarenko commented 3 years ago

@rickardp could you please reopen it?

rickardp commented 3 years ago

/reopen

k8s-ci-robot commented 3 years ago

@rickardp: Reopened this issue.

In response to [this](https://github.com/kubernetes-sigs/external-dns/issues/1829#issuecomment-879855474): >/reopen Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
pavlo-bondarenko commented 3 years ago

/remove-lifecycle rotten

k8s-triage-robot commented 3 years ago

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:

You can:

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

/lifecycle stale

olfway commented 3 years ago

/remove-lifecycle stale

k8s-triage-robot commented 2 years ago

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:

You can:

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

/lifecycle stale

olfway commented 2 years ago

/remove-lifecycle stale

k8s-triage-robot commented 2 years ago

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:

You can:

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

/lifecycle stale

pavlo-bondarenko commented 2 years ago

/remove-lifecycle stale

k8s-triage-robot commented 2 years ago

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:

You can:

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

/lifecycle stale

olfway commented 2 years ago

/remove-lifecycle stale

k8s-triage-robot commented 2 years ago

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:

You can:

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

/lifecycle stale

pavlo-bondarenko commented 2 years ago

/remove-lifecycle stale

k8s-triage-robot commented 1 year ago

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:

You can:

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

/lifecycle stale

pavlo-bondarenko commented 1 year ago

/remove-lifecycle stale

mateuszdrab commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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"
mblaschke-daimlertruck commented 1 year ago

also interested in that feature

romantomjak commented 1 year ago

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.

k8s-triage-robot commented 10 months 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

mlazowik commented 10 months ago

/remove-lifecycle stale

k8s-triage-robot commented 7 months 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

mlazowik commented 7 months ago

/remove-lifecycle stale

k8s-triage-robot commented 4 months 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

mlazowik commented 4 months ago

/remove-lifecycle stale

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

k8s-triage-robot commented 2 days ago

The Kubernetes project currently lacks enough active 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 rotten

mlazowik commented 8 hours ago

/remove-lifecycle rotten