commit c687abb461a7ca9b31e1ad8e6ed36e19c5e503e5 Author: Radar231 Date: Tue Oct 26 14:22:05 2021 -0400 initial checkin diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a908240 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*_secret.yml diff --git a/README.md b/README.md new file mode 100644 index 0000000..5955deb --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# journal-wiki k8s manifest + +## Introduction + +This deploys a nodejs tiddlywiki server. + diff --git a/pihole-1_deployment.yml b/pihole-1_deployment.yml new file mode 100644 index 0000000..8f29dfb --- /dev/null +++ b/pihole-1_deployment.yml @@ -0,0 +1,63 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: pihole-1 +spec: + selector: + matchLabels: + app: pihole-1 + replicas: 1 + strategy: + type: Recreate + template: + metadata: + labels: + app: pihole-1 + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: beta.kubernetes.io/arch + operator: In + values: + - arm64 + containers: + - name: pihole-1 + image: pihole/pihole:2021.10.1 + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: TZ + value: "America/Toronto" + - name: WEBPASSWORD + valueFrom: + secretKeyRef: + name: pihole-1-pass + key: WEBPASSWORD + ports: + - containerPort: 53 + name: "pihole-53tcp" + - containerPort: 53 + name: "pihole-53udp" + protocol: UDP + - containerPort: 80 + name: "pihole-80" + volumeMounts: + - name: pihole-1-etc-pihole + mountPath: "/etc/pihole" + - name: pihole-1-etc-dnsmasq-d + mountPath: "/etc/dnsmasq.d" + volumes: + - name: pihole-1-etc-pihole + persistentVolumeClaim: + claimName: pihole-1-etc-pihole-pvc + - name: pihole-1-etc-dnsmasq-d + persistentVolumeClaim: + claimName: pihole-1-etc-dnsmasq-d-pvc + +# EOF diff --git a/pihole-1_lb.yml b/pihole-1_lb.yml new file mode 100644 index 0000000..2eff7c7 --- /dev/null +++ b/pihole-1_lb.yml @@ -0,0 +1,41 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: pihole-1-tcp + annotations: + metallb.universe.tf/address-pool: default + metallb.universe.tf/allow-shared-ip: "dot80" +spec: + loadBalancerIP: 192.168.7.80 + ports: + - port: 53 + targetPort: 53 + name: tcp53 + - port: 80 + targetPort: 80 + name: tcp80 + selector: + app: pihole-1 + type: LoadBalancer + +--- +apiVersion: v1 +kind: Service +metadata: + name: pihole-1-udp + annotations: + metallb.universe.tf/address-pool: default + metallb.universe.tf/allow-shared-ip: "dot80" +spec: + loadBalancerIP: 192.168.7.80 + ports: + - port: 53 + targetPort: 53 + name: udp53 + protocol: UDP + selector: + app: pihole-1 + type: LoadBalancer + +# EOF diff --git a/pihole-1_pv.yml b/pihole-1_pv.yml new file mode 100644 index 0000000..8baa6ac --- /dev/null +++ b/pihole-1_pv.yml @@ -0,0 +1,41 @@ +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: pihole-1-etc-pihole-pv + labels: + name: pihole-1-etc-pihole-pv +spec: + storageClassName: manual + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + mountOptions: + - hard + - nfsvers=4.0 + nfs: + server: 192.168.7.11 + path: "/volume1/k8s-storage/pihole/pihole-1/etc-pihole" + +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: pihole-1-etc-dnsmasq-d-pv + labels: + name: pihole-1-etc-dnsmasq-d-pv +spec: + storageClassName: manual + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + mountOptions: + - hard + - nfsvers=4.0 + nfs: + server: 192.168.7.11 + path: "/volume1/k8s-storage/pihole/pihole-1/etc-dnsmasq-d" + +# EOF diff --git a/pihole-1_pvc.yml b/pihole-1_pvc.yml new file mode 100644 index 0000000..5680809 --- /dev/null +++ b/pihole-1_pvc.yml @@ -0,0 +1,36 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: pihole-1-etc-pihole-pvc + labels: + app: flexget +spec: + accessModes: + - ReadWriteOnce + storageClassName: "manual" + resources: + requests: + storage: 1Gi + selector: + matchLabels: + name: pihole-1-etc-pihole-pv +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: pihole-1-etc-dnsmasq-d-pvc + labels: + app: flexget +spec: + accessModes: + - ReadWriteOnce + storageClassName: "manual" + resources: + requests: + storage: 1Gi + selector: + matchLabels: + name: pihole-1-etc-dnsmasq-d-pv + +# EOF diff --git a/pihole-1_secret.yml.tmpl b/pihole-1_secret.yml.tmpl new file mode 100644 index 0000000..8648314 --- /dev/null +++ b/pihole-1_secret.yml.tmpl @@ -0,0 +1,16 @@ +--- +############################################# +# - creds for pihole-1 +# - generate value using; +# echo -n '' | base64 +############################################# + +apiVersion: v1 +kind: Secret +metadata: + name: pihole-1-pass +data: + # plaintext pw = "xxxxxxx" + WEBPASSWORD: xxxxxxx + +# EOF