Skip to content

Commit

Permalink
fix: add init container to quartz
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexXi19 committed Nov 2, 2024
1 parent e670697 commit c418427
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions resources/apps/quartz/quartz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
protocol=https
host=github.com
username=$GIT_USERNAME
password=$GIT_PASSWORD
EOF
git clone --branch "$GIT_SYNC_BRANCH" "$GIT_SYNC_REPO" "$GIT_SYNC_DEST"
containers:
- name: quartz
image: alexxi19/quartz:latest
Expand Down

0 comments on commit c418427

Please sign in to comment.