docker-pdns/examples/kubernetes/admin-dashboard.yaml

113 lines
2.7 KiB
YAML
Raw Normal View History

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: pdns-admin
app.kubernetes.io/part-of: pdns
app.kubernetes.io/component: admin
name: pdns-admin
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: pdns-admin
app.kubernetes.io/part-of: pdns
app.kubernetes.io/component: admin
template:
metadata:
labels:
app.kubernetes.io/name: pdns-admin
app.kubernetes.io/part-of: pdns
app.kubernetes.io/component: admin
spec:
hostAliases:
- ip: "127.0.0.1"
hostnames:
- "pdns-admin"
containers:
- name: pdns-admin
image: pschiffe/pdns-admin
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
protocol: TCP
env:
- name: PDNS_ADMIN_SQLA_DB_HOST
2023-12-19 23:12:51 +01:00
value: "mariadb-pdns"
- name: PDNS_ADMIN_SQLA_DB_PORT
2023-12-19 23:12:51 +01:00
value: "3306"
- name: PDNS_ADMIN_SQLA_DB_USER
2023-12-19 23:12:51 +01:00
value: "root"
- name: PDNS_ADMIN_SQLA_DB_PASSWORD
valueFrom:
secretKeyRef:
name: pdns-admin-secret
key: quoted_mysql_password
- name: PDNS_ADMIN_SQLA_DB_NAME
2023-12-19 23:12:51 +01:00
value: "pdnsadmin"
- name: PDNS_API_URL
value: "http://master-api-pdns:8081/"
- name: PDNS_VERSION
2023-12-17 02:39:45 +01:00
value: "4.8"
- name: PDNS_API_KEY
valueFrom:
secretKeyRef:
name: master-pdns-secret
key: apikey
volumeMounts:
- name: uploads
mountPath: /opt/powerdns-admin/upload/
resources:
limits:
cpu: 300m
memory: 128Mi
requests:
cpu: 50m
memory: 64Mi
volumes:
- name: uploads
persistentVolumeClaim:
claimName: pdns-admin-pvc
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app.kubernetes.io/name: pdns-admin-pvc
app.kubernetes.io/part-of: pdns
app.kubernetes.io/component: admin
name: pdns-admin-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/name: pdns-admin-svc
app.kubernetes.io/part-of: pdns
app.kubernetes.io/component: admin
name: admin-dashboard-pdns
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 8080
selector:
app.kubernetes.io/name: pdns-admin
---
apiVersion: v1
kind: Secret
metadata:
labels:
app.kubernetes.io/name: pdns-admin-secret
app.kubernetes.io/part-of: pdns
app.kubernetes.io/component: admin
name: pdns-admin-secret
data:
quoted_mysql_password: J3Jvb3Qn