103 lines
2.7 KiB
YAML
103 lines
2.7 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: invidious
|
|
namespace: default
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: invidious
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: invidious
|
|
spec:
|
|
initContainers:
|
|
- name: config-generator
|
|
image: busybox
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
sed -e "s/__POSTGRES_PASSWORD__/${POSTGRES_PASSWORD}/" \
|
|
-e "s/__COMPANION_KEY__/${COMPANION_KEY}/" \
|
|
-e "s/__HMAC_KEY__/${HMAC_KEY}/" \
|
|
/config-template.yaml > /config/config.yaml
|
|
env:
|
|
- name: POSTGRES_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: invidious-db-secrets
|
|
key: postgres-password
|
|
- name: COMPANION_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: invidious-app-secrets
|
|
key: companion-key
|
|
- name: HMAC_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: invidious-app-secrets
|
|
key: hmac-key
|
|
volumeMounts:
|
|
- name: config-template
|
|
mountPath: /config-template.yaml
|
|
subPath: config-template.yaml
|
|
- name: config
|
|
mountPath: /config
|
|
containers:
|
|
- name: invidious
|
|
image: quay.io/invidious/invidious:master
|
|
env:
|
|
- name: INVIDIOUS_CONFIG
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: invidious-config
|
|
key: config.yaml
|
|
- name: POSTGRES_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: invidious-db-secrets
|
|
key: postgres-password
|
|
- name: COMPANION_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: invidious-app-secrets
|
|
key: companion-key
|
|
- name: HMAC_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: invidious-app-secrets
|
|
key: hmac-key
|
|
envFrom:
|
|
- secretRef:
|
|
name: invidious-db-secrets
|
|
- secretRef:
|
|
name: invidious-app-secrets
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /app/config.yaml
|
|
subPath: config.yaml
|
|
- name: logging
|
|
mountPath: /var/log/invidious
|
|
ports:
|
|
- containerPort: 3000
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/v1/trending
|
|
port: 3000
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
timeoutSeconds: 5
|
|
failureThreshold: 2
|
|
volumes:
|
|
- name: logging
|
|
emptyDir: {}
|
|
- name: config-template
|
|
configMap:
|
|
name: invidious-config-template
|
|
- name: config
|
|
emptyDir: {}
|