From 548dd140919b7538cec9f228cd67f417295935da Mon Sep 17 00:00:00 2001 From: Clemens Date: Thu, 7 Mar 2024 12:01:19 +0100 Subject: [PATCH] Added build-configmap as env to build-cron --- src/main/cljc/dda/c4k_website/website.cljc | 1 - src/main/resources/website/build-cron.yaml | 2 ++ src/test/cljc/dda/c4k_website/website_test.cljc | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/cljc/dda/c4k_website/website.cljc b/src/main/cljc/dda/c4k_website/website.cljc index 8065ca6..d1dc3ac 100644 --- a/src/main/cljc/dda/c4k_website/website.cljc +++ b/src/main/cljc/dda/c4k_website/website.cljc @@ -104,7 +104,6 @@ #"REDIRECTS" (generate-redirects config 2))))))) -; TODO add to build-cron env (defn-spec generate-build-configmap pred/map-or-seq? [config websiteconfig?] (let [{:keys [unique-name diff --git a/src/main/resources/website/build-cron.yaml b/src/main/resources/website/build-cron.yaml index afb5622..e8534a4 100644 --- a/src/main/resources/website/build-cron.yaml +++ b/src/main/resources/website/build-cron.yaml @@ -31,6 +31,8 @@ spec: memory: BUILD_MEMORY_LIMIT command: ["/entrypoint.sh"] envFrom: + - configMapRef: + name: build-configmap - secretRef: name: build-secret volumeMounts: diff --git a/src/test/cljc/dda/c4k_website/website_test.cljc b/src/test/cljc/dda/c4k_website/website_test.cljc index d6de269..21895fc 100644 --- a/src/test/cljc/dda/c4k_website/website_test.cljc +++ b/src/test/cljc/dda/c4k_website/website_test.cljc @@ -208,7 +208,8 @@ :imagePullPolicy "IfNotPresent", :resources {:requests {:cpu "500m", :memory "256Mi"}, :limits {:cpu "1700m", :memory "512Mi"}}, :command ["/entrypoint.sh"], - :envFrom [{:secretRef {:name "build-secret"}}], + :envFrom [{:configMapRef {:name "build-configmap"}} + {:secretRef {:name "build-secret"}}], :volumeMounts [{:name "content-volume", :mountPath "/var/www/html/website"} {:name "hash-state-volume", :mountPath "/var/hashfile.d"}]}], :volumes [{:name "content-volume", :persistentVolumeClaim {:claimName "content-volume"}}