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

Use DNSEndpoint for all records #4859

Open
lucasfcnunes opened this issue Nov 8, 2024 · 4 comments
Open

Use DNSEndpoint for all records #4859

lucasfcnunes opened this issue Nov 8, 2024 · 4 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@lucasfcnunes
Copy link

lucasfcnunes commented Nov 8, 2024

What would you like to be added:

Use the kind DNSEndpoint for all generated DNS records.

  • When a service, ingress, etc needs to have their records created, it should always trigger the creation of a respective DNSEndpoint with a ownerReferences[0] self-reference in it.
  • The resource in ownerReferences[0] shouldn't be used for anything but to generate the DNSEndpoint.
  • Only the DNSEndpoint should be used as the source of truth for the syncing of the records.

Example:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: airflow-ingress
  namespace: airflow
  annotations:
    external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
spec:
  ingressClassName: nginx
  rules:
    - host: airflow.example.com
      http:
        paths:
          - backend:
              service:
                name: airflow-webserver
                port:
                  name: airflow-ui
            path: /
            pathType: ImplementationSpecific
    - # ...
status:
  loadBalancer:
    ingress:
      - ip: 123.4.5.6
---
apiVersion: externaldns.k8s.io/v1alpha1
kind: DNSEndpoint
metadata:
  name: airflow-ingress
  namespace: airflow
  ownerReferences:
    - apiVersion: networking.k8s.io/v1
      blockOwnerDeletion: true
      controller: true
      kind: Ingress
      name: airflow-ingress
spec:
  endpoints:
    - dnsName: airflow.example.com
      recordType: A
      targets:
        - 123.4.5.6
      providerSpecific:
        - name: external-dns.alpha.kubernetes.io/cloudflare-proxied
          value: "true"
    - # ...
status:
  conditions:
    - lastTransitionTime: "2024-10-14T10:24:24Z"
      message: DNSEndpoint is up to date
      observedGeneration: 1
      reason: Ready
      status: "True"
      type: Ready
  notAfter: "2025-01-12T09:25:51Z"
  notBefore: "2024-10-14T09:25:52Z"
  renewalTime: "2024-12-13T09:25:51Z"
  revision: 1

Why is this needed:

  • Transparency on what external-dns is doing or trying to do with the domains
  • Keep track of all DNS records
  • Possibility of a detailed status for all records being synced
  • ownerReferences is used in multiple systems e.g. Argo CD to link related k8s resources
  • Possibility to kubectl get DNSEndpoint -A -o yaml and have the actual state of all managed records
  • Make external-dns flow more like what we see in cert-manager (DNSEnpoint <=> Certificate)
@lucasfcnunes lucasfcnunes added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 8, 2024
@laserpedro
Copy link

In my case we need to create records from DNSEndpoints resources coming from the AW Gateway API Controller and therefore we need to pass extra arguments to the controller which creates two ways of managing records in the cluster, via the ingress and via the dns endpoints, I agree with the above it would be easier to manage records in a unified way. Also in my case, and it is not mentioned by the doc, we do not know the controller behavior once we add as ExtraArgs:
--source crd --crd-source-apiversion externaldns.k8s.io/v1alpha1 --crd-source-kind DNSEndpoint
regarding the records that are already managed using Ingresses ...

@ivankatliarchuk
Copy link
Contributor

/help

@k8s-ci-robot
Copy link
Contributor

@ivankatliarchuk:
This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/help

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Feb 1, 2025
@ivankatliarchuk
Copy link
Contributor

link #5079

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants