Mercurial > code > home > repos > infra
changeset 80:bc909bf8b80e
another try at dns with /etc/k3s_resolv.conf
author | drewp@bigasterisk.com |
---|---|
date | Sat, 18 Jun 2022 13:42:10 -0700 |
parents | 3f7d4626234c |
children | bf1573dd1947 |
files | coredns_freshen.sh kube.py templates/dnsmasq/dnsmasq.conf.j2 templates/kube/config.yaml.j2 templates/kube/k3s_resolv.conf.j2 templates/kube/node-config.yaml.j2 |
diffstat | 6 files changed, 21 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/coredns_freshen.sh Sat Jun 18 13:42:10 2022 -0700 @@ -0,0 +1,3 @@ +#!/bin/zsh +kubectl apply -f templates/kube/coredns.yaml +kubectl get -n kube-system configmap/coredns -o yaml
--- a/kube.py Sat Jun 18 13:40:55 2022 -0700 +++ b/kube.py Sat Jun 18 13:42:10 2022 -0700 @@ -63,7 +63,12 @@ token=token, wg_ip=host.host_data['wireguard_address'], ) - + files.template( + src='templates/kube/k3s_resolv.conf.j2', + dest='/etc/k3s_resolv.conf', + master_ip=master_ip, + wg_ip=host.host_data['wireguard_address'], + ) files.template( src='templates/kube/k3s.service.j2', dest=f'/etc/systemd/system/{service_name}',
--- a/templates/dnsmasq/dnsmasq.conf.j2 Sat Jun 18 13:40:55 2022 -0700 +++ b/templates/dnsmasq/dnsmasq.conf.j2 Sat Jun 18 13:42:10 2022 -0700 @@ -13,7 +13,7 @@ no-hosts addn-hosts=/opt/dnsmasq/{{ net }}/hosts local-ttl=30 -mx-host=bigasterisk.com,prime6.bigasterisk.com +mx-host=bigasterisk.com cache-size=10000 neg-ttl=60 dns-forward-max=1000
--- a/templates/kube/config.yaml.j2 Sat Jun 18 13:40:55 2022 -0700 +++ b/templates/kube/config.yaml.j2 Sat Jun 18 13:42:10 2022 -0700 @@ -1,4 +1,4 @@ -debug: true +debug: false write-kubeconfig-mode: '640' bind-address: 0.0.0.0 http-listen-port: 6443
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/kube/k3s_resolv.conf.j2 Sat Jun 18 13:42:10 2022 -0700 @@ -0,0 +1,6 @@ +# written by pyinfra + + +nameserver 10.5.0.1 +#options edns0 +search bigasterisk.com \ No newline at end of file
--- a/templates/kube/node-config.yaml.j2 Sat Jun 18 13:40:55 2022 -0700 +++ b/templates/kube/node-config.yaml.j2 Sat Jun 18 13:42:10 2022 -0700 @@ -1,4 +1,6 @@ -#node-external-ip: {{ wg_ip }} +debug: false +node-external-ip: {{ wg_ip }} node-ip: {{ wg_ip }} token: {{ token }} -server: https://{{ master_ip }}:6443 \ No newline at end of file +server: https://{{ master_ip }}:6443 +resolv-conf: /etc/k3s_resolv.conf \ No newline at end of file