aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--kubernetes/ntp/Dockerfile2
-rwxr-xr-xkubernetes/ntp/deploy.sh4
-rw-r--r--kubernetes/ntp/openntpd-deployment.yaml57
-rw-r--r--kubernetes/pihole/dhcp61
4 files changed, 122 insertions, 2 deletions
diff --git a/kubernetes/ntp/Dockerfile b/kubernetes/ntp/Dockerfile
deleted file mode 100644
index 5e4f0dc..0000000
--- a/kubernetes/ntp/Dockerfile
+++ /dev/null
@@ -1,2 +0,0 @@
-FROM alpine:3.15
-apk add --no-cache && apk add --no-cache openntpd
diff --git a/kubernetes/ntp/deploy.sh b/kubernetes/ntp/deploy.sh
new file mode 100755
index 0000000..ee6480d
--- /dev/null
+++ b/kubernetes/ntp/deploy.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env sh
+
+kubectl create configmap ntp-config --from-file=ntp.conf
+kubectl apply -f ./openntpd-deployment.yaml
diff --git a/kubernetes/ntp/openntpd-deployment.yaml b/kubernetes/ntp/openntpd-deployment.yaml
new file mode 100644
index 0000000..030f55d
--- /dev/null
+++ b/kubernetes/ntp/openntpd-deployment.yaml
@@ -0,0 +1,57 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: openntpd
+ labels:
+ app: openntpd
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: openntpd
+ template:
+ metadata:
+ labels:
+ app: openntpd
+ spec:
+ containers:
+ - name: openntpd
+ image: linuxkit/openntpd:v0.8
+ command:
+ - ntpd
+ - -d
+ - -p
+ - /var/run/ntpd.pid
+ - -f
+ - /etc/ntpd/ntpd.conf
+ ports:
+ - containerPort: 123
+ volumeMounts:
+ - name: ntp-conf
+ mountPath: /etc/ntpd/ntpd.conf
+ subPath: ntpd.conf
+ readOnly: true
+ volumes:
+ - name: ntp-conf
+ configMap:
+ name: ntp-config
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: openntpd-service
+spec:
+ selector:
+ app: openntpd
+ type: NodePort
+ ports:
+ - protocol: UDP
+ port: 30123
+ targetPort: 123
+ nodePort: 30123
+ name: "openntpd-udp-123"
+ - protocol: TCP
+ port: 30123
+ targetPort: 123
+ nodePort: 30123
+ name: "openntpd-tcp-123"
diff --git a/kubernetes/pihole/dhcp b/kubernetes/pihole/dhcp
new file mode 100644
index 0000000..3f51e22
--- /dev/null
+++ b/kubernetes/pihole/dhcp
@@ -0,0 +1,61 @@
+config 'dnsmasq'
+ #option 'domainneeded' '1'
+ option 'boguspriv' '1'
+ option 'localise_queries' '1'
+ option 'rebind_protection' '1'
+ option 'rebind_localhost' '1'
+ option 'expandhosts' '1'
+ option 'authoritative' '1'
+ option 'readethers' '1'
+ option 'leasefile' '/tmp/dhcp.leases'
+ option 'resolvfile' '/tmp/resolv.conf.auto'
+ option 'enable_tftp' '1'
+ #option 'domain' 'domain.net'
+ #option 'local' '/domain.net/'
+
+config 'dhcp' 'lan'
+ option 'interface' 'enp3s0f1'
+ option 'start' '100'
+ option `limit` `150`
+ option 'leasetime' 'infinite'
+
+config 'dhcp' 'lan'
+ option 'interface' 'wlp2s0'
+ option 'start' '100'
+ option `limit` `150`
+ option 'leasetime' 'infinite'
+
+config 'host'
+ option 'name' 'voidbox'
+ option 'mac' '08:62:66:B8:7C:B6'
+ option 'ip' '192.168.1.103'
+
+config 'host'
+ option 'name' 'pi3'
+ option 'mac' 'B8:27:EB:89:6C:2A'
+ option 'ip' '192.168.1.108'
+
+config 'host'
+ option 'name' 'pi4'
+ option 'mac' 'DC:A6:32:C1:34:C0'
+ option 'ip' '192.168.1.109'
+
+config 'host'
+ option 'name' 'deviphone'
+ option 'mac' '22:45:1E:41:AA:D0'
+ option 'ip' '192.168.1.110'
+
+config 'host'
+ option 'name' 'switch1'
+ option 'mac' 'AC:84:C6:02:CF:90'
+ option 'ip' '192.168.1.106'
+
+config 'host'
+ option 'name' 'pizero'
+ option 'mac' 'B8:27:EB:8F:BF:72'
+ option 'ip' '192.168.1.115'
+
+config 'host'
+ option 'name' 'pi2'
+ option 'mac' 'B8:27:EB:70:49:C4'
+ option 'ip' '192.168.1.105'