diff --git a/frontend/providers/template/deploy/manifests/deploy.yaml.tmpl b/frontend/providers/template/deploy/manifests/deploy.yaml.tmpl index 42206046736..17c8b32d594 100644 --- a/frontend/providers/template/deploy/manifests/deploy.yaml.tmpl +++ b/frontend/providers/template/deploy/manifests/deploy.yaml.tmpl @@ -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: @@ -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