From c418427467abd526a4308f73c8975f996fb94946 Mon Sep 17 00:00:00 2001 From: AlexXi19 Date: Sat, 2 Nov 2024 17:05:57 +0000 Subject: [PATCH] fix: add init container to quartz --- resources/apps/quartz/quartz.yaml | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/resources/apps/quartz/quartz.yaml b/resources/apps/quartz/quartz.yaml index 86f5a09..8758616 100644 --- a/resources/apps/quartz/quartz.yaml +++ b/resources/apps/quartz/quartz.yaml @@ -16,6 +16,42 @@ spec: volumes: - name: content-volume emptyDir: {} + initContainers: + - name: git-repo-cloner + image: alpine/git + volumeMounts: + - name: content-volume + mountPath: /usr/src/app/content + env: + - name: GIT_SYNC_REPO + value: https://github.com/alexxi19/notes.git + - name: GIT_SYNC_DEST + value: /usr/src/app/content + - name: GIT_SYNC_BRANCH + value: main + - name: GIT_USERNAME + valueFrom: + secretKeyRef: + name: git-creds + key: username + - name: GIT_PASSWORD + valueFrom: + secretKeyRef: + name: git-creds + key: password + command: ['/bin/sh'] + args: + - '-c' + - | + set -e + git config --global credential.helper store + git credential approve <