From 3b2761878dc79106982c855435765f5bee74733d Mon Sep 17 00:00:00 2001 From: Julien Eluard Date: Thu, 25 Feb 2021 17:35:18 +0100 Subject: [PATCH] Moved to kustomize based conf --- Makefile | 2 +- .../berkeley-sp21/templates/kustomization.yaml | 10 ++++++++++ .../overlays/berkeley-sp21/templates/node-template | 1 - .../overlays/industry-connect/templates/assignement | 1 - .../industry-connect/templates/kustomization.yaml | 10 ++++++++++ .../overlays/production/templates/kustomization.yaml | 11 +++++++++++ conf/k8s/overlays/production/templates/node-template | 1 - conf/k8s/overlays/production/templates/recipes | 1 - .../overlays/staging/templates/kustomization.yaml | 12 ++++++++++++ conf/k8s/overlays/staging/templates/node-template | 1 - conf/k8s/overlays/staging/templates/recipes | 1 - conf/k8s/overlays/staging/templates/substrate | 1 - 12 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 conf/k8s/overlays/berkeley-sp21/templates/kustomization.yaml delete mode 120000 conf/k8s/overlays/berkeley-sp21/templates/node-template delete mode 120000 conf/k8s/overlays/industry-connect/templates/assignement create mode 100644 conf/k8s/overlays/industry-connect/templates/kustomization.yaml create mode 100644 conf/k8s/overlays/production/templates/kustomization.yaml delete mode 120000 conf/k8s/overlays/production/templates/node-template delete mode 120000 conf/k8s/overlays/production/templates/recipes create mode 100644 conf/k8s/overlays/staging/templates/kustomization.yaml delete mode 120000 conf/k8s/overlays/staging/templates/node-template delete mode 120000 conf/k8s/overlays/staging/templates/recipes delete mode 120000 conf/k8s/overlays/staging/templates/substrate diff --git a/Makefile b/Makefile index 91b6548bf..3d814a0b1 100644 --- a/Makefile +++ b/Makefile @@ -192,7 +192,7 @@ k8s-undeploy-theia: requires-k8s ## Undeploy all theia pods and services from ku kubectl delete pods,services -l app.kubernetes.io/component=theia --namespace=${NAMESPACE} k8s-update-templates-config: requires-k8s ## Creates or replaces the `templates` config map from `conf/k8s/overlays/ENV/templates` - kubectl create configmap playground-templates --namespace=${NAMESPACE} --from-file=conf/k8s/overlays/${ENV}/templates/ --dry-run=client -o yaml | kubectl apply -f - + kustomize build --load-restrictor LoadRestrictionsNone conf/k8s/overlays/${ENV}/templates/ | kubectl apply -f - k8s-update-users-config: requires-k8s ## Creates or replaces the `users` config map from `conf/k8s/overlays/ENV/users` kubectl create configmap playground-users --namespace=${NAMESPACE} --from-file=conf/k8s/overlays/${ENV}/users/ --dry-run=client -o yaml | kubectl apply -f - diff --git a/conf/k8s/overlays/berkeley-sp21/templates/kustomization.yaml b/conf/k8s/overlays/berkeley-sp21/templates/kustomization.yaml new file mode 100644 index 000000000..94e81d2e1 --- /dev/null +++ b/conf/k8s/overlays/berkeley-sp21/templates/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +generatorOptions: + disableNameSuffixHash: true + +configMapGenerator: +- name: playground-templates + files: + - ../../../../templates/node-template diff --git a/conf/k8s/overlays/berkeley-sp21/templates/node-template b/conf/k8s/overlays/berkeley-sp21/templates/node-template deleted file mode 120000 index 085a23aa8..000000000 --- a/conf/k8s/overlays/berkeley-sp21/templates/node-template +++ /dev/null @@ -1 +0,0 @@ -/Users/julien/Documents/Projects/paritytech/substrate-playground/conf/templates/node-template \ No newline at end of file diff --git a/conf/k8s/overlays/industry-connect/templates/assignement b/conf/k8s/overlays/industry-connect/templates/assignement deleted file mode 120000 index 5fd2681e6..000000000 --- a/conf/k8s/overlays/industry-connect/templates/assignement +++ /dev/null @@ -1 +0,0 @@ -/Users/julien/Documents/Projects/paritytech/substrate-playground/conf/templates/assignement \ No newline at end of file diff --git a/conf/k8s/overlays/industry-connect/templates/kustomization.yaml b/conf/k8s/overlays/industry-connect/templates/kustomization.yaml new file mode 100644 index 000000000..0a644ef11 --- /dev/null +++ b/conf/k8s/overlays/industry-connect/templates/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +generatorOptions: + disableNameSuffixHash: true + +configMapGenerator: +- name: playground-templates + files: + - ../../../../templates/assignement diff --git a/conf/k8s/overlays/production/templates/kustomization.yaml b/conf/k8s/overlays/production/templates/kustomization.yaml new file mode 100644 index 000000000..7075d2911 --- /dev/null +++ b/conf/k8s/overlays/production/templates/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +generatorOptions: + disableNameSuffixHash: true + +configMapGenerator: +- name: playground-templates + files: + - ../../../../templates/node-template + - ../../../../templates/recipes diff --git a/conf/k8s/overlays/production/templates/node-template b/conf/k8s/overlays/production/templates/node-template deleted file mode 120000 index 085a23aa8..000000000 --- a/conf/k8s/overlays/production/templates/node-template +++ /dev/null @@ -1 +0,0 @@ -/Users/julien/Documents/Projects/paritytech/substrate-playground/conf/templates/node-template \ No newline at end of file diff --git a/conf/k8s/overlays/production/templates/recipes b/conf/k8s/overlays/production/templates/recipes deleted file mode 120000 index b348e174f..000000000 --- a/conf/k8s/overlays/production/templates/recipes +++ /dev/null @@ -1 +0,0 @@ -/Users/julien/Documents/Projects/paritytech/substrate-playground/conf/templates/recipes \ No newline at end of file diff --git a/conf/k8s/overlays/staging/templates/kustomization.yaml b/conf/k8s/overlays/staging/templates/kustomization.yaml new file mode 100644 index 000000000..c9d4ca0da --- /dev/null +++ b/conf/k8s/overlays/staging/templates/kustomization.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +generatorOptions: + disableNameSuffixHash: true + +configMapGenerator: +- name: playground-templates + files: + - ../../../../templates/node-template + - ../../../../templates/recipes + - ../../../../templates/substrate diff --git a/conf/k8s/overlays/staging/templates/node-template b/conf/k8s/overlays/staging/templates/node-template deleted file mode 120000 index 085a23aa8..000000000 --- a/conf/k8s/overlays/staging/templates/node-template +++ /dev/null @@ -1 +0,0 @@ -/Users/julien/Documents/Projects/paritytech/substrate-playground/conf/templates/node-template \ No newline at end of file diff --git a/conf/k8s/overlays/staging/templates/recipes b/conf/k8s/overlays/staging/templates/recipes deleted file mode 120000 index b348e174f..000000000 --- a/conf/k8s/overlays/staging/templates/recipes +++ /dev/null @@ -1 +0,0 @@ -/Users/julien/Documents/Projects/paritytech/substrate-playground/conf/templates/recipes \ No newline at end of file diff --git a/conf/k8s/overlays/staging/templates/substrate b/conf/k8s/overlays/staging/templates/substrate deleted file mode 120000 index 82526d757..000000000 --- a/conf/k8s/overlays/staging/templates/substrate +++ /dev/null @@ -1 +0,0 @@ -/Users/julien/Documents/Projects/paritytech/substrate-playground/conf/templates/substrate \ No newline at end of file