Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow configuration of extra coredns server blocks #1709

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

abaguas
Copy link
Collaborator

@abaguas abaguas commented Aug 16, 2024

The goal of this PR is to allow configuration of the glue records of the other clusters in k8gb's coreDNS. I know this defies DNS best practices because k8gb is not authoritative for the parent zone. However, it allows k8gb to do cluster discovery without depending on any infrastructure outside of the cluster.

The configuration is quite generic, giving the users freedom to configure what they desire, therefore we could add it to the chart.

Example configuration:

    extraServerBlocks: |
      example.com:5353 {
        errors
        health
        ready
        prometheus 0.0.0.0:9153
        forward . /etc/resolv.conf
        k8s_crd {
            filter k8gb.absa.oss/dnstype=glue
            negttl {{ .Values.k8gb.dnsZoneNegTTL }}
            loadbalance weight
        }
      }

Testing:

helm package . && helm template k8gb k8gb-v0.13.0.tgz > manifests.yaml

The goal of this PR is to allow configuration of the glue records of the other clusters in k8gb's coreDNS.
I know this defies DNS best practices because k8gb is not authoritative for the parent zone. However, it allows k8gb to do cluster discovery without depending on any infrastructure outside of the cluster.

The configuration is quite generic, giving the users freedom to configure what they desire, therefore we could add it to the chart.

Example configuration:
```
    extraServerBlocks: |
      example.com:5353 {
        errors
        health
        ready
        prometheus 0.0.0.0:9153
        forward . /etc/resolv.conf
        k8s_crd {
            filter k8gb.absa.oss/dnstype=glue
            negttl {{ .Values.k8gb.dnsZoneNegTTL }}
            loadbalance weight
        }
      }
```

Testing:
```
helm package . && helm template k8gb k8gb-v0.13.0.tgz > manifests.yaml
```

Signed-off-by: abaguas <andre.aguas@protonmail.com>
@abaguas abaguas force-pushed the extracoredns/config branch from 8df9bc4 to 024d375 Compare August 16, 2024 15:09
Copy link
Member

@ytsarev ytsarev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it allows k8gb to do cluster discovery without depending on any infrastructure outside of the cluster.

Can we document this use case?

Copy link
Member

@ytsarev ytsarev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is useful for flexible configuration. Thanks for the contribution!

@ytsarev ytsarev merged commit 518a2ce into k8gb-io:master Sep 17, 2024
11 checks passed
@abaguas
Copy link
Collaborator Author

abaguas commented Sep 17, 2024

Thanks. I will revise my usecase and document it if I still find the setup useful

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants