82 lines
2.0 KiB
YAML
82 lines
2.0 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: wait-for-companion
|
|
image: busybox
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
until nc -z -v -w30 inv-sig-helper 12999; do
|
|
echo "Waiting for companion to be ready..."
|
|
sleep 2
|
|
done
|
|
- name: wait-for-db
|
|
image: busybox
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
until nc -z -v -w30 invidious-db-service 5432; do
|
|
echo "Waiting for database to be ready..."
|
|
sleep 2
|
|
done
|
|
- name: substitute-config
|
|
image: alpine
|
|
envFrom:
|
|
- secretRef:
|
|
name: invidious-secrets
|
|
command:
|
|
- sh
|
|
- -c
|
|
- apk add gettext && envsubst < /mnt/init/invidious.yml > /mnt/invidious.yml
|
|
volumeMounts:
|
|
- name: invidious-config
|
|
mountPath: /mnt/init/invidious.yml
|
|
subPath: invidious.yml
|
|
- name: tmp
|
|
mountPath: /mnt
|
|
subPath: invidious.yml
|
|
containers:
|
|
- name: invidious
|
|
image: quay.io/invidious/invidious@sha256:c9b87b8e33484f0a2fd5fc9b386ddbad81b704b3361e45881b3821295ceabd6d
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
export INVIDIOUS_CONFIG="$(cat /mnt/invidious.yml)" &&
|
|
exec /invidious/invidious
|
|
env:
|
|
- name: INVIDIOUS_PORT
|
|
value: "3000"
|
|
ports:
|
|
- containerPort: 3000
|
|
volumeMounts:
|
|
- name: logging
|
|
mountPath: /var/log/invidious
|
|
- name: tmp
|
|
mountPath: /mnt
|
|
subPath: invidious.yml
|
|
volumes:
|
|
- name: logging
|
|
emptyDir: {}
|
|
- name: tmp
|
|
emptyDir: {}
|
|
- name: invidious-config
|
|
configMap:
|
|
name: invidious-config
|