Skip to content

Commit

Permalink
chore: template add init container.
Browse files Browse the repository at this point in the history
Signed-off-by: yy <[email protected]>
  • Loading branch information
lingdie committed Jan 19, 2024
1 parent f3de924 commit 2742cfa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions frontend/providers/template/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ spec:
labels:
app: template-frontend
spec:
initContainers:
- command:
- sh
- -c
- chmod -R 777 /data/templates/.git && cp -r -a /data/templates/. /template-data/
image: ghcr.io/labring-actions/sealos-template-init:latest
imagePullPolicy: Always
name: template-frontend-init
volumeMounts:
- mountPath: /template-data
name: template-data
containers:
- name: template-frontend
resources:
Expand Down Expand Up @@ -64,10 +75,14 @@ spec:
- name: template-frontend-volume
mountPath: /config.yaml
subPath: config.yaml
- name: template-data
mountPath: /app/providers/template/templates
volumes:
- name: template-frontend-volume
configMap:
name: template-frontend-config
- name: template-data
emptyDir: {}
---
apiVersion: v1
kind: Service
Expand Down

0 comments on commit 2742cfa

Please sign in to comment.