invidious: Fix flaky init container

This commit is contained in:
Rob Watson 2023-01-12 07:05:10 +01:00
parent cc7aef5212
commit 8e8ff2a889
3 changed files with 18 additions and 1 deletions

View File

@ -27,7 +27,9 @@ spec:
volumeMounts:
- mountPath: /data
name: data
command: ["git", "clone", "--depth", "1", "https://github.com/iv-org/invidious.git", "/data/repo"]
- mountPath: /scripts
name: scripts
command: ["/bin/sh", "/scripts/init.sh"]
- image: jbergknoff/postgresql-client:latest
imagePullPolicy: IfNotPresent
name: init-invidious-db
@ -117,3 +119,6 @@ spec:
- name: config
configMap:
name: invidious-config
- name: scripts
configMap:
name: invidious-scripts

View File

@ -0,0 +1,6 @@
if [ -d /data/repo ]; then
cd /data/repo
git pull
else
git clone --depth 1 https://github.com/iv-org/invidious.git /data/repo
fi

View File

@ -108,6 +108,12 @@ configMapGenerator:
files:
- init-directory-structure.sh=gitea-init-directory-structure.sh
- setup.sh=gitea-setup.sh
- name: invidious-scripts
files:
- init.sh=invidious-init.sh
options:
labels:
app: invidious
secretGenerator:
- name: aws-do-external-dns-credentials