Files
homelab/k8s/apps/pasarguard/deployment.yaml

85 lines
2.2 KiB
YAML
Raw Normal View History

2025-11-05 12:13:42 +02:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: pasarguard
labels:
app: pasarguard
annotations:
reloader.stakater.com/auto: "true"
spec:
selector:
matchLabels:
app: pasarguard
replicas: 1
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: pasarguard
spec:
nodeSelector:
kubernetes.io/hostname: master.tail2fe2d.ts.net
2025-11-06 22:48:58 +02:00
initContainers:
- name: download-template
image: busybox:latest
command:
- sh
- -c
- |
wget -O /templates/subscription/index.html https://github.com/PasarGuard/subscription-template/releases/latest/download/index.html
volumeMounts:
- name: subscription-template
mountPath: /templates/subscription
2025-11-05 12:13:42 +02:00
containers:
- name: pasarguard-web
image: 'pasarguard/panel:v1.4.1'
imagePullPolicy: Always
envFrom:
- secretRef:
name: pasarguard-secrets
env:
2025-11-05 15:50:00 +02:00
- name: UVICORN_HOST
2025-11-05 12:13:42 +02:00
value: "0.0.0.0"
2025-11-05 15:50:00 +02:00
- name: UVICORN_PORT
2025-11-05 12:13:42 +02:00
value: "8000"
- name: DOCS
value: "true"
2025-11-05 15:50:00 +02:00
- name: UVICORN_SSL_CERTFILE
2025-11-05 15:56:01 +02:00
value: "/app/tls/tls.crt"
2025-11-05 15:50:00 +02:00
- name: UVICORN_SSL_KEYFILE
2025-11-05 15:56:01 +02:00
value: "/app/tls/tls.key"
- name: CUSTOM_TEMPLATES_DIRECTORY
value: "/code/app/templates/"
- name: SUBSCRIPTION_PAGE_TEMPLATE
value: "subscription/index.html"
2025-11-05 12:13:42 +02:00
ports:
- name: http
containerPort: 8000
protocol: TCP
2025-11-05 15:50:00 +02:00
volumeMounts:
2025-11-05 15:56:01 +02:00
- name: tls
mountPath: /app/tls
2025-11-05 15:50:00 +02:00
readOnly: true
2025-11-06 22:48:58 +02:00
- name: subscription-template
mountPath: /code/app/templates/subscription
2025-11-05 15:50:00 +02:00
volumes:
2025-11-05 15:56:01 +02:00
- name: tls
2025-11-05 15:50:00 +02:00
secret:
secretName: pasarguard-tls
2025-11-06 22:48:58 +02:00
- name: subscription-template
emptyDir: {}
2025-11-05 12:13:42 +02:00
---
apiVersion: v1
kind: Service
metadata:
name: pasarguard
spec:
selector:
app: pasarguard
ports:
- protocol: TCP
port: 80
targetPort: 8000