Files
homelab/kubernetes/app/media/deployment-prowlarr.yaml

78 lines
2.0 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: prowlarr
namespace: media
labels:
app: prowlarr
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: prowlarr
template:
metadata:
labels:
app: prowlarr
spec:
initContainers:
- name: wait-for-db
image: busybox:1.37
command:
- sh
- -c
- until nc -z prowlarr-db 5432; do echo "Waiting for database..."; sleep 2; done
- name: init-log-db
image: postgres:14.21
env:
- name: PGHOST
value: prowlarr-db
- name: PGUSER
valueFrom:
secretKeyRef:
name: media-db-credentials
key: PROWLARR_DB_USER
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: media-db-credentials
key: PROWLARR_DB_PASSWORD
command:
- sh
- -c
- psql -d postgres -c 'CREATE DATABASE "prowlarr-log"' || true
containers:
- name: prowlarr
image: lscr.io/linuxserver/prowlarr:2.3.5
envFrom:
- configMapRef:
name: media-common-env
ports:
- containerPort: 9696
name: http
protocol: TCP
livenessProbe:
httpGet:
port: 9696
path: /ping
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 10
failureThreshold: 5
readinessProbe:
httpGet:
port: 9696
path: /ping
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 10
volumeMounts:
- name: config
mountPath: /config
volumes:
- name: config
persistentVolumeClaim:
claimName: prowlarr-config