From e785833304c09b45ab78c87a8b25273759203871 Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Tue, 27 Feb 2024 10:45:36 +0100 Subject: [PATCH] fix content-pvc names --- src/main/cljc/dda/c4k_website/website/website_internal.cljc | 3 +-- .../{website-content-volume.yaml => content-pvc.yaml} | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) rename src/main/resources/website/{website-content-volume.yaml => content-pvc.yaml} (76%) diff --git a/src/main/cljc/dda/c4k_website/website/website_internal.cljc b/src/main/cljc/dda/c4k_website/website/website_internal.cljc index 2becb51..40a2ac5 100644 --- a/src/main/cljc/dda/c4k_website/website/website_internal.cljc +++ b/src/main/cljc/dda/c4k_website/website/website_internal.cljc @@ -165,8 +165,7 @@ (let [{:keys [unique-name volume-size]} config name (replace-dots-by-minus unique-name)] (-> - (yaml/load-as-edn "website/website-content-volume.yaml") - (assoc-in [:metadata :labels :app.kubernetes.part-of] name) + (yaml/load-as-edn "website/content-pvc.yaml") (replace-all-matching-substrings-beginning-with "NAME" name) (cm/replace-all-matching-values-by-new-value "WEBSITESTORAGESIZE" (str volume-size "Gi"))))) diff --git a/src/main/resources/website/website-content-volume.yaml b/src/main/resources/website/content-pvc.yaml similarity index 76% rename from src/main/resources/website/website-content-volume.yaml rename to src/main/resources/website/content-pvc.yaml index 4e6f130..a524974 100644 --- a/src/main/resources/website/website-content-volume.yaml +++ b/src/main/resources/website/content-pvc.yaml @@ -1,10 +1,9 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: NAME-content-volume - namespace: default + name: content-volume + namespace: NAME labels: - app: NAME-nginx app.kubernetes.part-of: NAME-website spec: storageClassName: local-path