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

Add support for dns.hosts plugin #7

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

mjtrangoni
Copy link

Hi @MonolithProjects,

I've found that the node-local-dns image v1.22.9 include the dns.hosts CoreDNS plugin, so this PR is adding support for it.

Basically, adding this to the values.yaml,

config:
  localDnsIp: 169.254.20.11
  zones:
    .:53:
      plugins:
        [...]
        hosts:
          entries:     # dns.hosts INLINE
            - ip: 10.5.0.4
              name: blabla.lala
          ttl: 3600       # in seconds, 3600 (default)
          no_reverse: true    # set no_reverse
          reload: "0s"    # 0s disable (default), use duration notation, ie, "1.5h"
          fallthrough: true
        [...]

would produces a Corefile like this,

  Corefile: |-
    .:53 {
      [...]
      hosts {
        10.5.0.4 blabla.lala
        ttl 3600
        no_reverse
        reload "0s"
        fallthrough
      }
    [...]
    }

I've left the example commented out just for reference.

Thank you!

Signed-off-by: Mario Trangoni <[email protected]>
Copy link

@MonolithProjects MonolithProjects left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks

@MonolithProjects MonolithProjects merged commit b9aa585 into lablabs:master Nov 29, 2023
1 check passed
@mjtrangoni mjtrangoni deleted the add-hosts-support branch November 29, 2023 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants