dns

DNS Deployment for nordgedanken.dev infra.
git clone git://archive.git.mtrnord.blog/Nordgedanken/dns.git
Log | Files | Refs

commit 07ac3fee019c060b2ce34878e9f37ad0aedf2b4d
parent 14447aa1e052eaa7d73a675147dffe4df0f7ac31
Author: MTRNord <mtrnord1@gmail.com>
Date:   Tue, 10 Oct 2023 16:38:49 +0200

Fix linter and add missing zones

Diffstat:
M.github/workflows/deploy.yml | 8+++-----
M.github/workflows/pullrequest.yml | 11++---------
A.yamllint | 29+++++++++++++++++++++++++++++
Mconfig/midnightthoughts.space.yaml | 140++++++++++++++++++++++++++++++++++++++++----------------------------------------
Aconfig/miki.community.yaml | 108+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aconfig/nordgedanken.dev.yaml | 348+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mconfig/production.yaml | 64++++++++++++++++++++++++++++++----------------------------------
7 files changed, 590 insertions(+), 118 deletions(-)

diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml @@ -1,11 +1,9 @@ +--- name: octodns Deploy - on: # Deploy config whenever DNS changes are pushed to main. push: - branches: - - main - + branches: [main] jobs: publish: name: Publish DNS config from main @@ -19,7 +17,7 @@ jobs: - uses: solvaholic/octodns-sync@main with: config_path: config/production.yaml - doit: '--doit' + doit: --doit env: POWERDNS_API_KEY_NS1: ${{ secrets.POWERDNS_API_KEY_NS1 }} POWERDNS_API_KEY_NS2: ${{ secrets.POWERDNS_API_KEY_NS2 }} diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml @@ -1,3 +1,4 @@ +--- name: Validate on: push: @@ -6,18 +7,14 @@ on: jobs: linting: runs-on: ubuntu-latest - steps: - name: Checkout repository uses: actions/checkout@v2.3.4 - - name: Run yamllint run: yamllint . validate: needs: linting - - if: "${{ github.event_name == 'pull_request' }}" - + if: ${{ github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -42,7 +39,6 @@ jobs: _sha="$(echo "${{ github.event.pull_request.head.sha }}" | cut -c 1-7)" # Set output 'sha' to $_sha echo "::set-output name=sha::${_sha}" - - name: Find comment uses: peter-evans/find-comment@2.4.0 id: fc @@ -50,7 +46,6 @@ jobs: issue-number: ${{ github.event.pull_request.number }} comment-author: github-actions[bot] body-includes: Automatically generated by octodns-sync - - name: Add or update PR comment uses: peter-evans/create-or-update-comment@3.0.2 with: @@ -58,8 +53,6 @@ jobs: comment-id: ${{ steps.fc.outputs.comment-id }} body: | ## OctoDNS Plan for `${{ steps.meta.outputs.sha }}` - ${{ steps.meta.outputs.plan }} - Automatically generated by octodns-sync edit-mode: replace diff --git a/.yamllint b/.yamllint @@ -0,0 +1,29 @@ +--- + +extends: default + +rules: + braces: + level: warning + max-spaces-inside: 1 + brackets: + level: warning + max-spaces-inside: 1 + colons: + level: warning + commas: + level: warning + comments: disable + comments-indentation: disable + document-start: disable + empty-lines: + level: warning + hyphens: + level: warning + indentation: + level: warning + indent-sequences: consistent + line-length: + level: warning + allow-non-breakable-inline-mappings: true + truthy: disable diff --git a/config/midnightthoughts.space.yaml b/config/midnightthoughts.space.yaml @@ -1,17 +1,17 @@ --- -? '' -: - ttl: 1800 +'': + - ttl: 1800 type: A value: 65.21.116.72 - ttl: 1800 type: CAA values: - - flags: 0 - tag: iodef - value: mailto:mtrnord@nordgedanken.dev - - flags: 0 - tag: issue - value: letsencrypt.org; validationmethods=tls-alpn-01,dns-01,http-01 + - flags: 0 + tag: iodef + value: mailto:mtrnord@nordgedanken.dev + - flags: 0 + tag: issue + value: letsencrypt.org; validationmethods=tls-alpn-01,dns-01,http-01 - ttl: 1800 type: MX value: @@ -20,9 +20,9 @@ - ttl: 600 type: NS values: - - ns1.nordgedanken.dev. - - ns2.nordgedanken.dev. - - ns3.nordgedanken.dev. + - ns1.nordgedanken.dev. + - ns2.nordgedanken.dev. + - ns3.nordgedanken.dev. - ttl: 1800 type: TXT value: google-site-verification=YeO0rqvYWOZoW6yj3MRf77luDe9CURDbmPYLFYiBXo8 @@ -40,12 +40,12 @@ art: type: A value: 65.21.116.72 castopod: -- ttl: 1800 - type: A - value: 65.21.116.74 -- ttl: 1800 - type: AAAA - value: 2a01:4f9:4a:451c:2::2 + - ttl: 1800 + type: A + value: 65.21.116.74 + - ttl: 1800 + type: AAAA + value: 2a01:4f9:4a:451c:2::2 coreharbor.kubernetes: ttl: 1800 type: A @@ -79,12 +79,12 @@ grafana: type: A value: 65.21.116.72 headscale: -- ttl: 1800 - type: A - value: 49.13.24.105 -- ttl: 1800 - type: AAAA - value: 2a01:4f8:c012:492::1 + - ttl: 1800 + type: A + value: 49.13.24.105 + - ttl: 1800 + type: AAAA + value: 2a01:4f8:c012:492::1 hookshot: ttl: 1800 type: A @@ -94,37 +94,37 @@ keycloak: type: A value: 65.21.116.72 kubernetes: -- ttl: 1800 - type: A - value: 95.217.202.35 -- ttl: 1800 - type: AAAA - value: 2a01:4f9:4a:451c:2::5 + - ttl: 1800 + type: A + value: 95.217.202.35 + - ttl: 1800 + type: AAAA + value: 2a01:4f9:4a:451c:2::5 lg: -- ttl: 1800 - type: A - value: 49.13.24.105 -- ttl: 1800 - type: AAAA - value: 2a01:4f8:c012:492::1 + - ttl: 1800 + type: A + value: 49.13.24.105 + - ttl: 1800 + type: AAAA + value: 2a01:4f8:c012:492::1 mail: -- ttl: 1800 - type: A - value: 95.217.202.35 -- ttl: 1800 - type: AAAA - value: 2a01:4f9:4a:451c:ffff:ffff:ffff:eeee -- ttl: 1800 - type: MX - value: - exchange: mail.midnightthoughts.space. - preference: 10 -- ttl: 1800 - type: TXT - values: - - google-site-verification=d5k_X67W_dLDw_KMEqTywt6s3ywb_3Nh-dWUuhoAhz0 - - v=spf1 mx include:_spf.mx.cloudflare.net a:mail.midnightthoughts.space ip4:65.21.116.72 - ~all + - ttl: 1800 + type: A + value: 95.217.202.35 + - ttl: 1800 + type: AAAA + value: 2a01:4f9:4a:451c:ffff:ffff:ffff:eeee + - ttl: 1800 + type: MX + value: + exchange: mail.midnightthoughts.space. + preference: 10 + - ttl: 1800 + type: TXT + values: + - google-site-verification=d5k_X67W_dLDw_KMEqTywt6s3ywb_3Nh-dWUuhoAhz0 + - v=spf1 mx include:_spf.mx.cloudflare.net a:mail.midnightthoughts.space ip4:65.21.116.72 + ~all matrix: ttl: 1800 type: A @@ -154,12 +154,12 @@ notes: type: CNAME value: cname.vercel-dns.com. pbx: -- ttl: 1800 - type: A - value: 49.13.24.105 -- ttl: 1800 - type: AAAA - value: 2a01:4f8:c012:492::1 + - ttl: 1800 + type: A + value: 49.13.24.105 + - ttl: 1800 + type: AAAA + value: 2a01:4f8:c012:492::1 postgres-ui: ttl: 1800 type: A @@ -177,12 +177,12 @@ rook.ceph: type: A value: 65.21.116.72 rspamd: -- ttl: 1800 - type: A - value: 65.21.116.74 -- ttl: 1800 - type: AAAA - value: 2a01:4f9:4a:451c:2::2 + - ttl: 1800 + type: A + value: 65.21.116.74 + - ttl: 1800 + type: AAAA + value: 2a01:4f9:4a:451c:2::2 search.art: ttl: 1800 type: A @@ -220,9 +220,9 @@ zammad: type: A value: 65.21.116.72 znc: -- ttl: 1800 - type: A - value: 49.13.24.105 -- ttl: 1800 - type: AAAA - value: 2a01:4f8:c012:492::1 + - ttl: 1800 + type: A + value: 49.13.24.105 + - ttl: 1800 + type: AAAA + value: 2a01:4f8:c012:492::1 diff --git a/config/miki.community.yaml b/config/miki.community.yaml @@ -0,0 +1,108 @@ +--- +'': + - ttl: 1800 + type: A + value: 65.21.116.72 + - ttl: 1800 + type: CAA + values: + - flags: 0 + tag: iodef + value: mailto:mtrnord@nordgedanken.dev + - flags: 0 + tag: issue + value: letsencrypt.org; validationmethods=tls-alpn-01,dns-01,http-01 + - ttl: 1800 + type: MX + value: + exchange: mail.nordgedanken.dev. + preference: 10 + - ttl: 600 + type: NS + values: + - ns1.nordgedanken.dev. + - ns2.nordgedanken.dev. + - ns3.nordgedanken.dev. + - ttl: 1800 + type: TXT + value: google-site-verification=tcGRl_gNRBdFRI8-tNAPj6x-8FbmGihFNcYn9_xS7tc +_acme-challenge.en.miki: + ttl: 1800 + type: TXT + value: ByjTAwqGgXpOAg98vd51UZnWSRrcc3sPTdWyUADk4SQ +_acme-challenge.miki: + ttl: 1800 + type: TXT + value: K4yAWrcSajiiYMCOSkE6mKRjdfDA_VMdlGSVeeC_z9A +_autodiscover._tcp: + ttl: 1800 + type: SRV + value: + port: 443 + priority: 10 + target: mail.nordgedanken.dev. + weight: 1 +_imap._tcp: + ttl: 1800 + type: SRV + value: + port: 143 + priority: 20 + target: mail.nordgedanken.dev. + weight: 1 +_imaps._tcp: + ttl: 1800 + type: SRV + value: + port: 993 + priority: 10 + target: mail.nordgedanken.dev. + weight: 1 +_pop3._tcp: + ttl: 1800 + type: SRV + value: + port: 110 + priority: 20 + target: mail.nordgedanken.dev. + weight: 1 +_pop3s._tcp: + ttl: 1800 + type: SRV + value: + port: 995 + priority: 10 + target: mail.nordgedanken.dev. + weight: 1 +_submission._tcp: + ttl: 1800 + type: SRV + value: + port: 587 + priority: 20 + target: mail.nordgedanken.dev. + weight: 1 +_submissions._tcp: + ttl: 1800 + type: SRV + value: + port: 465 + priority: 10 + target: mail.nordgedanken.dev. + weight: 1 +autoconfig: + ttl: 1800 + type: CNAME + value: mail.nordgedanken.dev. +data: + ttl: 1800 + type: A + value: 65.21.116.72 +en: + ttl: 1800 + type: A + value: 65.21.116.72 +forum: + ttl: 1800 + type: A + value: 49.13.24.105 diff --git a/config/nordgedanken.dev.yaml b/config/nordgedanken.dev.yaml @@ -0,0 +1,348 @@ +--- +'': + - ttl: 1800 + type: A + value: 116.202.1.213 + - ttl: 1800 + type: AAAA + value: 2a01:4f9:4a:451c:2::2 + - ttl: 1800 + type: CAA + values: + - flags: 0 + tag: iodef + value: mailto:mtrnord@nordgedanken.dev + - flags: 0 + tag: issue + value: letsencrypt.org; validationmethods=tls-alpn-01,dns-01,http-01 + - ttl: 1800 + type: MX + value: + exchange: mail.nordgedanken.dev. + preference: 10 + - ttl: 600 + type: NS + values: + - ns1.nordgedanken.dev. + - ns2.nordgedanken.dev. + - ns3.nordgedanken.dev. + - ttl: 1800 + type: TXT + values: + - google-site-verification=SkIjIdwvyBPvaivZFa5KgLX22pwSJdINdaTf0XAi5Qc + - v=spf1 mx a:mail.nordgedanken.dev ip4:65.21.116.72 ~all +_autodiscover._tcp: + ttl: 1800 + type: SRV + value: + port: 443 + priority: 10 + target: mail.nordgedanken.dev. + weight: 1 +_dmarc: + ttl: 1800 + type: TXT + value: v=DMARC1\; p=reject\; adkim=s\; aspf=s\; rua=mailto:postmaster@mail.nordgedanken.dev\; + ruf=mailto:postmaster@mail.nordgedanken.dev +_dmarc.mail: + ttl: 1800 + type: TXT + value: v=DMARC1\; p=reject\; adkim=s\; aspf=s\; rua=mailto:postmaster@mail.nordgedanken.dev\; + ruf=mailto:postmaster@mail.nordgedanken.dev +_imap._tcp: + ttl: 1800 + type: SRV + value: + port: 143 + priority: 20 + target: mail.nordgedanken.dev. + weight: 1 +_imap._tcp.mail: + ttl: 1800 + type: SRV + value: + port: 143 + priority: 20 + target: mail.nordgedanken.dev. + weight: 1 +_imaps._tcp: + ttl: 1800 + type: SRV + value: + port: 993 + priority: 10 + target: mail.nordgedanken.dev. + weight: 1 +_imaps._tcp.mail: + ttl: 1800 + type: SRV + value: + port: 993 + priority: 10 + target: mail.nordgedanken.dev. + weight: 1 +_pop3._tcp: + ttl: 1800 + type: SRV + value: + port: 110 + priority: 20 + target: mail.nordgedanken.dev. + weight: 1 +_pop3._tcp.mail: + ttl: 1800 + type: SRV + value: + port: 110 + priority: 20 + target: mail.nordgedanken.dev. + weight: 1 +_pop3s._tcp: + ttl: 1800 + type: SRV + value: + port: 995 + priority: 10 + target: mail.nordgedanken.dev. + weight: 1 +_pop3s._tcp.mail: + ttl: 1800 + type: SRV + value: + port: 995 + priority: 10 + target: mail.nordgedanken.dev. + weight: 1 +_submission._tcp: + ttl: 1800 + type: SRV + value: + port: 587 + priority: 20 + target: mail.nordgedanken.dev. + weight: 1 +_submission._tcp.mail: + ttl: 1800 + type: SRV + value: + port: 587 + priority: 20 + target: mail.nordgedanken.dev. + weight: 1 +_submissions._tcp: + ttl: 1800 + type: SRV + value: + port: 465 + priority: 10 + target: mail.nordgedanken.dev. + weight: 1 +_submissions._tcp.mail: + ttl: 1800 + type: SRV + value: + port: 465 + priority: 10 + target: mail.nordgedanken.dev. + weight: 1 +auth: + ttl: 1800 + type: A + value: 65.21.116.72 +autoconfig: + ttl: 1800 + type: CNAME + value: mail.nordgedanken.dev. +barcodebuddy: + ttl: 1800 + type: A + value: 65.21.116.72 +ci: + ttl: 1800 + type: A + value: 65.21.116.72 +cloud: + ttl: 1800 + type: A + value: 65.21.116.72 +console.s3.stream: + ttl: 1800 + type: A + value: 65.21.116.72 +dkim._domainkey: + ttl: 1800 + type: TXT + value: v=DKIM1\; k=rsa\; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtwpfwC7+gqVw55vqq+pqR3J0k/pBOVlyXqUo89D08zx91tLHy+mZFv3saiw94FzBEWF7cnvUSyDoyN9fnw6StNX3rMEvr2XCor+F2DpYjnG7gXjjkAPIs+d1/bja0MJkXjE0bXIET4yz3OjP9UVKMlIn3wkzr28KZShIGI8mtWUhC1oR7/tN8LOR1FoZB8GoEsgsOLZoHBUadjN8pE6LmS5MaaYcF3BdYTCQ63rpb5sf0hi9Hy1on+G7sDGE2Eg6ySlmzA9/Z4d8on3ghPKYRVLUs1Osf1k/hPsgJwxn/vDbxoBhaXUt+uxVMaLPadbhFHPWbUOZZD7LdiXjvhB+6wIDAQAB +dkim._domainkey.mail: + ttl: 1800 + type: TXT + value: v=DKIM1\; k=rsa\; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzq73h8EUXEpSzIMWppGWr08k0OpPJDZ6ohrTHlTGfELjxfLoY0ZKM1OsWhpTrFimRWWSoXCUQCfshSDw6KWEgF1TeTh/+jhBoyJwUH37phC/jrXBV7Zqs6iAcwCw1gznV2wWs/uBcJcamD8RRq2wwBN9cIZksca7J/Tkm3WzcxqriX8PpSm4cbYl1MjDl5K8JWTIxNWlRXKyDW8H4II7NPnwOK8keExYEIh7AkE4suegtu73dxEwSz7Ct9a+Ch8mNZsG3WI2JldlKRkvUJB3CdFYHXIjRV4ibghoZEFzYQN8LIz3l6BRxFgvLDVXYj0v21fMXa3nxes+2ou2/qfrGwIDAQAB +git: + ttl: 1800 + type: A + value: 65.21.116.72 +github-hook: + ttl: 1800 + type: A + value: 65.21.116.72 +gitlab: + ttl: 1800 + type: A + value: 65.21.116.72 +grocy: + ttl: 1800 + type: A + value: 65.21.116.72 +kas: + ttl: 1800 + type: A + value: 65.21.116.72 +mail: + - ttl: 1800 + type: A + value: 65.21.116.74 + - ttl: 1800 + type: MX + value: + exchange: mail.nordgedanken.dev. + preference: 10 + - ttl: 1800 + type: TXT + value: v=spf1 mx a:mail.nordgedanken.dev ip4:65.21.116.72 ~all +mail.k8s: + ttl: 1800 + type: A + value: 65.21.116.72 +mail.nordgedanken.dev._report._dmarc.mail: + ttl: 1800 + type: TXT + value: v=DMARC1 +mastodon: + - ttl: 1800 + type: A + value: 116.202.1.213 + - ttl: 1800 + type: AAAA + value: 2a01:4f9:4a:451c:2::2 +minio: + ttl: 1800 + type: A + value: 65.21.116.72 +miounne: + ttl: 1800 + type: CNAME + value: nordgedanken.dev. +moderation_widget: + - ttl: 1800 + type: A + value: 116.202.1.213 + - ttl: 1800 + type: AAAA + value: 2a01:4f9:4a:451c:2::2 +morg: + ttl: 1800 + type: CNAME + value: mtrnord.github.io. +mta-sts: + ttl: 1800 + type: CNAME + value: mail.nordgedanken.dev. +mta-sts.mail.k8s: + ttl: 1800 + type: A + value: 65.21.116.72 +netbird: + - ttl: 1800 + type: A + value: 65.21.116.74 + - ttl: 1800 + type: AAAA + value: 2a01:4f9:4a:451c:2::2 +netbox: + ttl: 1800 + type: A + value: 65.21.116.72 +nordgedanken.dev._report._dmarc.mail: + ttl: 1800 + type: TXT + value: v=DMARC1 +ns1: + - ttl: 1800 + type: A + value: 65.21.116.72 + - ttl: 1800 + type: AAAA + value: 2a01:4f9:4a:451c:2::5 +ns2: + - ttl: 1800 + type: A + value: 37.27.5.79 + - ttl: 1800 + type: AAAA + value: '2a01:4f9:c012:54d3::' +ns3: + - ttl: 1800 + type: A + value: 37.27.7.20 + - ttl: 1800 + type: AAAA + value: 2a01:4f9:c012:3124::1 +pages: + ttl: 1800 + type: A + value: 65.21.116.73 +paperless: + ttl: 1800 + type: A + value: 65.21.116.72 +registry: + ttl: 1800 + type: A + value: 65.21.116.72 +s3.stream: + ttl: 1800 + type: A + value: 65.21.116.72 +search: + ttl: 1800 + type: A + value: 65.21.116.72 +social: + ttl: 1800 + type: A + value: 65.21.116.72 +stats: + - ttl: 1800 + type: A + value: 116.202.1.213 + - ttl: 1800 + type: AAAA + value: 2a01:4f9:4a:451c:2::2 +status: + ttl: 1800 + type: CNAME + value: mtrnord.github.io. +stream: + ttl: 1800 + type: A + value: 65.21.116.72 +support: + ttl: 1800 + type: A + value: 65.21.116.72 +time: + ttl: 1800 + type: A + value: 65.21.116.72 +trans: + ttl: 1800 + type: A + value: 65.21.116.72 +vault: + ttl: 1800 + type: A + value: 65.21.116.72 +www: + ttl: 1800 + type: CNAME + value: nordgedanken.dev. diff --git a/config/production.yaml b/config/production.yaml @@ -4,44 +4,40 @@ providers: class: octodns.provider.yaml.YamlProvider directory: ./config default_ttl: 3600 - enforce_order: True + enforce_order: true powerdns_ns1: - class: octodns_powerdns.PowerDnsProvider - # The host on which PowerDNS api is listening (required) - host: 65.21.116.72 - # The port on whih PowerDNS api is listening (optional, default 8081) - port: 8082 - # The api key that grans access (required, example is using an env var) - api_key: env/POWERDNS_API_KEY_NS1 - # Send DNS NOTIFY to secondary servers after change (optional, default false) - # notify: false + class: octodns_powerdns.PowerDnsProvider + # The host on which PowerDNS api is listening (required) + host: 65.21.116.72 + # The port on whih PowerDNS api is listening (optional, default 8081) + port: 8082 + # The api key that grans access (required, example is using an env var) + api_key: env/POWERDNS_API_KEY_NS1 + # Send DNS NOTIFY to secondary servers after change (optional, default false) + # notify: false powerdns_ns2: - class: octodns_powerdns.PowerDnsProvider - # The host on which PowerDNS api is listening (required) - host: 37.27.5.79 - # The port on whih PowerDNS api is listening (optional, default 8081) - port: 8081 - # The api key that grans access (required, example is using an env var) - api_key: env/POWERDNS_API_KEY_NS2 - # Send DNS NOTIFY to secondary servers after change (optional, default false) - # notify: false + class: octodns_powerdns.PowerDnsProvider + # The host on which PowerDNS api is listening (required) + host: 37.27.5.79 + # The port on whih PowerDNS api is listening (optional, default 8081) + port: 8081 + # The api key that grans access (required, example is using an env var) + api_key: env/POWERDNS_API_KEY_NS2 + # Send DNS NOTIFY to secondary servers after change (optional, default false) + # notify: false powerdns_ns3: - class: octodns_powerdns.PowerDnsProvider - # The host on which PowerDNS api is listening (required) - host: 37.27.7.20 - # The port on whih PowerDNS api is listening (optional, default 8081) - port: 8081 - # The api key that grans access (required, example is using an env var) - api_key: env/POWERDNS_API_KEY_NS3 - # Send DNS NOTIFY to secondary servers after change (optional, default false) - # notify: false + class: octodns_powerdns.PowerDnsProvider + # The host on which PowerDNS api is listening (required) + host: 37.27.7.20 + # The port on whih PowerDNS api is listening (optional, default 8081) + port: 8081 + # The api key that grans access (required, example is using an env var) + api_key: env/POWERDNS_API_KEY_NS3 + # Send DNS NOTIFY to secondary servers after change (optional, default false) + # notify: false zones: midnightthoughts.space.: &default - sources: - - config - targets: - - powerdns_ns1 - - powerdns_ns2 - - powerdns_ns3 + sources: [config] + targets: [powerdns_ns1, powerdns_ns2, powerdns_ns3] nordgedanken.dev.: *default miki.community.: *default