remove separate db and sig-helper deployments
This commit is contained in:
@@ -10,10 +10,10 @@ data:
|
|||||||
dbname: invidious
|
dbname: invidious
|
||||||
user: kemal
|
user: kemal
|
||||||
password: ${INVIDIOUS_DB_PASSWORD}
|
password: ${INVIDIOUS_DB_PASSWORD}
|
||||||
host: invidious-db-service
|
host: localhost
|
||||||
port: 5432
|
port: 5432
|
||||||
check_tables: true
|
check_tables: true
|
||||||
signature_server: inv-sig-helper:12999
|
signature_server: localhost:12999
|
||||||
visitor_data: ${VISITOR_DATA}
|
visitor_data: ${VISITOR_DATA}
|
||||||
po_token: ${PO_TOKEN}
|
po_token: ${PO_TOKEN}
|
||||||
port: 3000
|
port: 3000
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: invidious-db
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: invidious-db
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: invidious-db
|
|
||||||
spec:
|
|
||||||
initContainers:
|
|
||||||
- name: clean-db-dir
|
|
||||||
image: busybox
|
|
||||||
command:
|
|
||||||
- sh
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
rm -rf /var/lib/postgresql/data/lost+found
|
|
||||||
volumeMounts:
|
|
||||||
- name: postgres-data
|
|
||||||
mountPath: /var/lib/postgresql/data
|
|
||||||
containers:
|
|
||||||
- name: postgres
|
|
||||||
image: postgres:14
|
|
||||||
env:
|
|
||||||
- name: POSTGRES_DB
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: invidious-db-secrets
|
|
||||||
key: postgres-db
|
|
||||||
- name: POSTGRES_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: invidious-db-secrets
|
|
||||||
key: postgres-user
|
|
||||||
- name: POSTGRES_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: invidious-db-secrets
|
|
||||||
key: postgres-password
|
|
||||||
ports:
|
|
||||||
- containerPort: 5432
|
|
||||||
volumeMounts:
|
|
||||||
- name: postgres-data
|
|
||||||
mountPath: /var/lib/postgresql/data
|
|
||||||
livenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- pg_isready
|
|
||||||
- -U
|
|
||||||
- kemal
|
|
||||||
- -d
|
|
||||||
- invidious
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
readinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- pg_isready
|
|
||||||
- -U
|
|
||||||
- kemal
|
|
||||||
- -d
|
|
||||||
- invidious
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
volumes:
|
|
||||||
- name: postgres-data
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: longhorn-invidious-config
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: inv-sig-helper
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: inv-sig-helper
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: inv-sig-helper
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: inv-sig-helper
|
|
||||||
image: quay.io/invidious/inv-sig-helper@sha256:b5466c9add729e82e4e3ee5515c30b69df02d78ebb2486dbc9c63e456f29083d
|
|
||||||
args: ["--tcp", "0.0.0.0:12999"]
|
|
||||||
env:
|
|
||||||
- name: RUST_LOG
|
|
||||||
value: "info"
|
|
||||||
ports:
|
|
||||||
- containerPort: 12999
|
|
||||||
securityContext:
|
|
||||||
readOnlyRootFilesystem: true
|
|
||||||
capabilities:
|
|
||||||
drop:
|
|
||||||
- ALL
|
|
||||||
@@ -1,45 +1,3 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: invidious-db-service
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: invidious-db
|
|
||||||
ports:
|
|
||||||
- protocol: TCP
|
|
||||||
port: 5432
|
|
||||||
targetPort: 5432
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: invidious
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: invidious
|
|
||||||
ports:
|
|
||||||
- protocol: TCP
|
|
||||||
port: 3000
|
|
||||||
targetPort: 3000
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: inv-sig-helper
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: inv-sig-helper
|
|
||||||
ports:
|
|
||||||
- protocol: TCP
|
|
||||||
port: 12999
|
|
||||||
targetPort: 12999
|
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
|
|||||||
@@ -15,26 +15,6 @@ spec:
|
|||||||
app: invidious
|
app: invidious
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
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
|
- name: substitute-config
|
||||||
image: alpine
|
image: alpine
|
||||||
envFrom:
|
envFrom:
|
||||||
@@ -51,6 +31,50 @@ spec:
|
|||||||
- name: tmp
|
- name: tmp
|
||||||
mountPath: /mnt
|
mountPath: /mnt
|
||||||
subPath: invidious.yml
|
subPath: invidious.yml
|
||||||
|
- name: clean-db-dir
|
||||||
|
image: busybox
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
rm -rf /var/lib/postgresql/data/lost+found
|
||||||
|
volumeMounts:
|
||||||
|
- name: postgres-data
|
||||||
|
mountPath: /var/lib/postgresql/data
|
||||||
|
- name: postgres
|
||||||
|
image: postgres:14
|
||||||
|
restartPolicy: Always
|
||||||
|
env:
|
||||||
|
- name: POSTGRES_DB
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: invidious-db-secrets
|
||||||
|
key: postgres-db
|
||||||
|
- name: POSTGRES_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: invidious-db-secrets
|
||||||
|
key: postgres-user
|
||||||
|
- name: POSTGRES_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: invidious-db-secrets
|
||||||
|
key: postgres-password
|
||||||
|
volumeMounts:
|
||||||
|
- name: postgres-data
|
||||||
|
mountPath: /var/lib/postgresql/data
|
||||||
|
- name: inv-sig-helper
|
||||||
|
image: quay.io/invidious/inv-sig-helper@sha256:b5466c9add729e82e4e3ee5515c30b69df02d78ebb2486dbc9c63e456f29083d
|
||||||
|
restartPolicy: Always
|
||||||
|
args: ["--tcp", "0.0.0.0:12999"]
|
||||||
|
env:
|
||||||
|
- name: RUST_LOG
|
||||||
|
value: "info"
|
||||||
|
securityContext:
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
containers:
|
containers:
|
||||||
- name: invidious
|
- name: invidious
|
||||||
image: quay.io/invidious/invidious@sha256:9ffa4f1ea5cf01abe3102777102bd7a13153c79f6ff6ac072b6a29dda6909a8b
|
image: quay.io/invidious/invidious@sha256:9ffa4f1ea5cf01abe3102777102bd7a13153c79f6ff6ac072b6a29dda6909a8b
|
||||||
@@ -79,3 +103,6 @@ spec:
|
|||||||
- name: invidious-config
|
- name: invidious-config
|
||||||
configMap:
|
configMap:
|
||||||
name: invidious-config
|
name: invidious-config
|
||||||
|
- name: postgres-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: longhorn-invidious-config
|
||||||
|
|||||||
Reference in New Issue
Block a user