2022-05-11 09:18:49 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: invidious
|
|
|
|
labels:
|
2022-06-05 15:44:52 +00:00
|
|
|
app: invidious
|
|
|
|
component: web
|
2022-05-11 09:18:49 +00:00
|
|
|
app.kubernetes.io/name: invidious
|
|
|
|
app.kubernetes.io/instance: invidious
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
2022-06-05 15:44:52 +00:00
|
|
|
app: invidious
|
|
|
|
component: web
|
2022-05-11 09:18:49 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2022-06-05 15:44:52 +00:00
|
|
|
app: invidious
|
|
|
|
component: web
|
2022-05-11 09:18:49 +00:00
|
|
|
app.kubernetes.io/name: invidious
|
|
|
|
app.kubernetes.io/instance: invidious
|
|
|
|
spec:
|
|
|
|
initContainers:
|
|
|
|
- image: alpine/git:latest
|
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
name: init-invidious-repo
|
|
|
|
volumeMounts:
|
2022-05-19 19:46:14 +00:00
|
|
|
- mountPath: /data
|
|
|
|
name: data
|
2023-01-12 06:05:10 +00:00
|
|
|
- mountPath: /scripts
|
|
|
|
name: scripts
|
|
|
|
command: ["/bin/sh", "/scripts/init.sh"]
|
2022-05-11 09:18:49 +00:00
|
|
|
- image: jbergknoff/postgresql-client:latest
|
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
name: init-invidious-db
|
|
|
|
volumeMounts:
|
2022-05-19 19:46:14 +00:00
|
|
|
- mountPath: /data
|
|
|
|
name: data
|
2022-05-11 09:18:49 +00:00
|
|
|
env:
|
|
|
|
- name: PGHOST
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: invidious-credentials
|
|
|
|
key: database-host
|
|
|
|
optional: false
|
|
|
|
- name: PGPORT
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: invidious-credentials
|
|
|
|
key: database-port
|
|
|
|
optional: false
|
|
|
|
# See init-invidious-db.sh:
|
|
|
|
- name: POSTGRES_DB
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: invidious-credentials
|
|
|
|
key: database-name
|
|
|
|
optional: false
|
|
|
|
# See init-invidious-db.sh:
|
|
|
|
- name: POSTGRES_USER
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: invidious-credentials
|
|
|
|
key: database-user
|
|
|
|
optional: false
|
|
|
|
- name: PGPASSWORD
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: invidious-credentials
|
|
|
|
key: database-password
|
|
|
|
optional: false
|
2022-05-19 19:46:14 +00:00
|
|
|
workingDir: /data/repo
|
|
|
|
command: ["sh", "docker/init-invidious-db.sh"]
|
2022-05-11 09:18:49 +00:00
|
|
|
containers:
|
|
|
|
- image: quay.io/invidious/invidious:latest
|
2022-06-27 16:49:41 +00:00
|
|
|
imagePullPolicy: Always
|
2022-05-11 09:18:49 +00:00
|
|
|
name: invidious
|
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
protocol: TCP
|
|
|
|
containerPort: 3000
|
|
|
|
env:
|
|
|
|
- name: INVIDIOUS_CONFIG_FILE
|
|
|
|
value: /invidious/config/config.yml
|
|
|
|
- name: INVIDIOUS_DATABASE_URL
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: invidious-credentials
|
|
|
|
key: database-url
|
|
|
|
optional: false
|
2023-07-03 21:06:27 +00:00
|
|
|
- name: INVIDIOUS_HMAC_KEY
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: invidious-credentials
|
|
|
|
key: hmac-key
|
|
|
|
optional: false
|
2022-05-11 09:18:49 +00:00
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /invidious/config/config.yml
|
|
|
|
subPath: config.yml
|
|
|
|
name: config
|
2022-05-11 18:21:14 +00:00
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
memory: "128Mi"
|
|
|
|
cpu: "100m"
|
|
|
|
limits:
|
|
|
|
memory: "256Mi"
|
|
|
|
cpu: "500m"
|
2022-05-17 13:54:26 +00:00
|
|
|
lifecycle:
|
|
|
|
preStop:
|
|
|
|
exec:
|
|
|
|
command: ["kill", "-INT", "1"]
|
2022-05-11 09:18:49 +00:00
|
|
|
livenessProbe:
|
|
|
|
failureThreshold: 10
|
|
|
|
httpGet:
|
|
|
|
path: /api/v1/comments/jNQXAC9IVRw
|
|
|
|
port: 3000
|
|
|
|
scheme: HTTP
|
|
|
|
initialDelaySeconds: 30
|
|
|
|
periodSeconds: 10
|
|
|
|
successThreshold: 1
|
|
|
|
timeoutSeconds: 10
|
|
|
|
volumes:
|
2022-05-19 19:46:14 +00:00
|
|
|
- name: data
|
2022-05-11 09:18:49 +00:00
|
|
|
emptyDir: {}
|
|
|
|
- name: config
|
|
|
|
configMap:
|
|
|
|
name: invidious-config
|
2023-01-12 06:05:10 +00:00
|
|
|
- name: scripts
|
|
|
|
configMap:
|
|
|
|
name: invidious-scripts
|