Skip to content

Commit

Permalink
Remove initContianer now that git-sync can update app data on the fly.
Browse files Browse the repository at this point in the history
Add a startupProbe to ensure we don't try to serve until the font data has arrived, and a liveness check to ensure the pod is restarted if the service deadlocks.
  • Loading branch information
tim-eves committed Jun 19, 2024
1 parent fbf0e8f commit 5d76cb7
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions kubernetes/prod/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,23 @@ spec:
postStart:
exec:
command:
- '/bin/ln'
- '-sf'
- '/tunable-fonts/typetunerweb/web/server/TypeTuner/tunable-fonts'
- '/var/www/typetunerweb/web/server/TypeTuner/'

initContainers:
- name: sync-init-tunable-fonts-repo
image: registry.k8s.io/git-sync/git-sync:v4.1.0
imagePullPolicy: IfNotPresent
args:
- '--repo=https://github.com/silnrsi/typetunerweb'
- '--one-time'
- '--depth=1'
- '--root=/mnt'
- '--period=10m'
volumeMounts:
- mountPath: /mnt
name: typetuner-repo
resources: *git-sync-resources
- /bin/ln
- -sf
- /tunable-fonts/typetunerweb/web/server/TypeTuner/tunable-fonts
- /var/www/typetunerweb/web/server/TypeTuner/
startupProbe:
exec:
command:
- /usr/bin/test
- -d
- /tunable-fonts/typetunerweb/web/server/TypeTuner/tunable-fonts/.
periodSeconds: 10
failureThreshold: 7
livenessProbe:
tcpSocket:
port: fastcgi
periodSeconds: 5
failureThreshold: 2

volumes:
- name: typetuner-repo
Expand Down

0 comments on commit 5d76cb7

Please sign in to comment.