Merge pull request 'Add Kubernetes configurations for Pi-hole deployment, services, and secrets' (#199) from pihole into main
Reviewed-on: https://gitea.akshun-lab.uk/akshun/public-k3s/pulls/199
This commit was merged in pull request #199.
This commit is contained in:
14
cluster/apps/pihole/pihole-pvc.yml
Normal file
14
cluster/apps/pihole/pihole-pvc.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: pihole-ceph
|
||||
namespace: default
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
volumeMode: Filesystem
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: csi-rbd-sc
|
||||
38
cluster/apps/pihole/pihole-svc.yml
Normal file
38
cluster/apps/pihole/pihole-svc.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pihole-tcp-service
|
||||
namespace: default
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: pihole
|
||||
ports:
|
||||
- port: 8585
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
name: web
|
||||
- port: 53
|
||||
targetPort: 53
|
||||
protocol: TCP
|
||||
name: dns-tcp
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pihole-udp-service
|
||||
namespace: default
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: pihole
|
||||
ports:
|
||||
- port: 53
|
||||
targetPort: 53
|
||||
protocol: UDP
|
||||
name: dns-udp
|
||||
- port: 67
|
||||
targetPort: 67
|
||||
protocol: UDP
|
||||
name: dhcp
|
||||
42
cluster/apps/pihole/pihole.yml
Normal file
42
cluster/apps/pihole/pihole.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: pihole
|
||||
namespace: default
|
||||
spec:
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: pihole
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: pihole
|
||||
spec:
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: pihole
|
||||
image: pihole/pihole@sha256:2a0985b8a039e6a3496c9076e238e48044d74ca12b18b061f8e4be48d35debf8
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_ADMIN
|
||||
env:
|
||||
- name: TZ
|
||||
value: "Asia/Kolkata"
|
||||
- name: FTLCONF_dns_listeningMode
|
||||
value: "all"
|
||||
- name: FTLCONF_webserver_api_password
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: pihole-secrets
|
||||
key: api_password
|
||||
volumeMounts:
|
||||
- name: pihole-data
|
||||
mountPath: /etc/pihole
|
||||
volumes:
|
||||
- name: pihole-data
|
||||
persistentVolumeClaim:
|
||||
claimName: pihole-ceph
|
||||
16
cluster/config/secrets/pihole-secrets-sealed.yml
Normal file
16
cluster/config/secrets/pihole-secrets-sealed.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
apiVersion: bitnami.com/v1alpha1
|
||||
kind: SealedSecret
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: pihole-serets
|
||||
namespace: default
|
||||
spec:
|
||||
encryptedData:
|
||||
api_password: AgAibBzTcn8qRAE+UcQeQ7cw+EdeTwV4fu4y/bRO+tPPam3wWdMrG2eifHPq0lFC2bxX7r4iBSGYe1n2MBeehXpCIMYWXk50Y8RM+e/45n7TZGviVZIiIWbv2NzWgtvZGDKeIn88McDL+fKGV5pnH+ncF4aA/pxjAHherRl4+mHTMZGzRPU+Nebld8r1nTmJk5M0SUZbSariqDi8ivuAW38O066DeK8ol08a0Dkb4raw84T7a+1nqCvIEbUy3k3LGrRGZ0N6yvRqHoO/VBWIUYqAF+hA3PBPMxQSbimb8eiF+ZNf5H9ZZkS7fHbjuBKkPZ6PdlLy027ZcP6ZxbmEKlUb/qWmKM8MLQS21IS15HYLIOQGPgNhHj6eFW2Qy4ZCG9s27to7K+46JRf72o2eQo/8vsWsTJCbTb+gaGm8A8e/foOQCPM6kgJvLTHll33EzzcBI4t17yOA8W92u2ezcAvZZBlmruJYY/XXrrJPmywTfY2QYixsXXDKbP+ytOgXhReN+Pex/+RiI9gz3TI13zK2PlhK62dBi6T0Rhmq/BORJ9J6tr1Q3yso+40fojGnF8bSGEZRzuFX4pn2mGYOI0mro1lm9Q4uWzK6EbkVcpvcGLx8tJUO5ULouzoRmvvrHufdv+LHDzJFn90ySS9OCvYt6x9cSXF3LYP/TDf++GCYHbnNKpKPtsnUrWPIyQbUl2Ukw4HBS2dtn9ZEOA==
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: pihole-serets
|
||||
namespace: default
|
||||
type: Opaque
|
||||
Reference in New Issue
Block a user