85 lines
2.2 KiB
YAML
85 lines
2.2 KiB
YAML
---
|
|
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
|
|
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
|
|
containers:
|
|
- name: pasarguard-web
|
|
image: 'pasarguard/panel:v1.7.2'
|
|
imagePullPolicy: Always
|
|
envFrom:
|
|
- secretRef:
|
|
name: pasarguard-secrets
|
|
env:
|
|
- name: UVICORN_HOST
|
|
value: "0.0.0.0"
|
|
- name: UVICORN_PORT
|
|
value: "8000"
|
|
- name: DOCS
|
|
value: "true"
|
|
- name: UVICORN_SSL_CERTFILE
|
|
value: "/app/tls/tls.crt"
|
|
- name: UVICORN_SSL_KEYFILE
|
|
value: "/app/tls/tls.key"
|
|
- name: CUSTOM_TEMPLATES_DIRECTORY
|
|
value: "/code/app/templates/"
|
|
- name: SUBSCRIPTION_PAGE_TEMPLATE
|
|
value: "subscription/index.html"
|
|
ports:
|
|
- name: http
|
|
containerPort: 8000
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- name: tls
|
|
mountPath: /app/tls
|
|
readOnly: true
|
|
- name: subscription-template
|
|
mountPath: /code/app/templates/subscription
|
|
volumes:
|
|
- name: tls
|
|
secret:
|
|
secretName: pasarguard-tls
|
|
- name: subscription-template
|
|
emptyDir: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: pasarguard
|
|
spec:
|
|
selector:
|
|
app: pasarguard
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 8000
|