From 3ac04dd27e35c6462d457bace67141684caa0240 Mon Sep 17 00:00:00 2001 From: Matthieu Lamalle Date: Mon, 3 Jul 2023 11:24:45 +0200 Subject: [PATCH] test theme volume mount --- .../hydra-dispatcher-deployment.yaml | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/resources/hydra-dispatcher/resources/hydra-dispatcher-deployment.yaml b/resources/hydra-dispatcher/resources/hydra-dispatcher-deployment.yaml index 1605af3..e05985c 100644 --- a/resources/hydra-dispatcher/resources/hydra-dispatcher-deployment.yaml +++ b/resources/hydra-dispatcher/resources/hydra-dispatcher-deployment.yaml @@ -16,6 +16,24 @@ spec: labels: io.kompose.service: hydra-dispatcher spec: + initContainers: + # This container clones the desired git repo to the EmptyDir volume. + - name: git-theme + image: alpine/git # Any image with git will do + args: + - clone + - --single-branch + - -- + - https://forge.cadoles.com/CNOUS/hydra-dispatcher-mse-theme.git # Your repo + - /theme # Put it in the volume + securityContext: + runAsUser: 1 # Any non-root user will do. Match to the workload. + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + volumeMounts: + - name: git-theme + mountPath: /theme + containers: - name: hydra-dispatcher-php-fpm image: reg.cadoles.com/cadoles/hydra-dispatcher-kube:0.0.1 @@ -31,8 +49,10 @@ spec: - configMapRef: name: hydra-dispatcher-env volumeMounts: - - mountPath: /app/config/hydra - name: hydra-dispatcher-apps + - name: hydra-dispatcher-apps + mountPath: /app/config/hydra + - name: git-theme + mountPath: /theme resources: {} - image: reg.cadoles.com/cadoles/hydra-dispatcher-kube:0.0.1 @@ -61,3 +81,5 @@ spec: - name: hydra-dispatcher-apps configMap: name: hydra-dispatcher-apps + - name: git-theme + emptyDir: {}