feature/introduce-namespaces #3

Merged
jem merged 11 commits from feature/introduce-namespaces into main 2024-02-27 10:13:49 +00:00
3 changed files with 9 additions and 10 deletions
Showing only changes of commit 68c4f02344 - Show all commits

View file

@ -176,8 +176,7 @@
(let [{:keys [unique-name]} config (let [{:keys [unique-name]} config
name (replace-dots-by-minus unique-name)] name (replace-dots-by-minus unique-name)]
(-> (->
(yaml/load-as-edn "website/hashfile-volume.yaml") (yaml/load-as-edn "website/hash-state-pvc.yaml")
(assoc-in [:metadata :labels :app.kubernetes.part-of] name)
(replace-all-matching-substrings-beginning-with "NAME" name)))) (replace-all-matching-substrings-beginning-with "NAME" name))))

View file

@ -1,10 +1,9 @@
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
name: NAME-hashfile-volume name: hash-state-volume
namespace: default namespace: NAME
labels: labels:
app: NAME-nginx
app.kubernetes.part-of: NAME-website app.kubernetes.part-of: NAME-website
spec: spec:
storageClassName: local-path storageClassName: local-path

View file

@ -3,7 +3,6 @@
#?(:clj [clojure.test :refer [deftest is are testing run-tests]] #?(:clj [clojure.test :refer [deftest is are testing run-tests]]
:cljs [cljs.test :refer-macros [deftest is are testing run-tests]]) :cljs [cljs.test :refer-macros [deftest is are testing run-tests]])
[clojure.spec.test.alpha :as st] [clojure.spec.test.alpha :as st]
[dda.c4k-common.test-helper :as th]
[dda.c4k-website.website.website-internal :as cut])) [dda.c4k-website.website.website-internal :as cut]))
(st/instrument `cut/generate-nginx-configmap) (st/instrument `cut/generate-nginx-configmap)
@ -215,10 +214,12 @@
(is (= {:apiVersion "v1", (is (= {:apiVersion "v1",
:kind "PersistentVolumeClaim", :kind "PersistentVolumeClaim",
:metadata :metadata
{:name "test-io-hashfile-volume", {:name "hash-state-volume",
:namespace "default", :namespace "test-io",
:labels {:app "test-io-nginx", :app.kubernetes.part-of "test-io"}}, :labels {:app.kubernetes.part-of "test-io-website"}},
:spec {:storageClassName "local-path", :accessModes ["ReadWriteOnce"], :resources {:requests {:storage "16Mi"}}}} :spec {:storageClassName "local-path",
:accessModes ["ReadWriteOnce"],
:resources {:requests {:storage "16Mi"}}}}
(cut/generate-hashfile-volume {:issuer "staging" (cut/generate-hashfile-volume {:issuer "staging"
:build-cpu-request "500m" :build-cpu-request "500m"
:build-cpu-limit "1700m" :build-cpu-limit "1700m"