From 554129709331327f8ca2243e4d09f0e3112d2b91 Mon Sep 17 00:00:00 2001 From: Kostis Kapelonis Date: Fri, 11 Mar 2022 13:34:16 +0200 Subject: [PATCH] First env --- envs/integration-gpu/deployment.yml | 15 +++++++++++++++ envs/integration-gpu/kustomization.yml | 16 ++++++++++++++++ envs/integration-gpu/replicas.yml | 7 +++++++ envs/integration-gpu/version.yml | 11 +++++++++++ variants/asia/kustomization.yml | 7 ++----- variants/eu/kustomization.yml | 7 ++----- variants/non-prod/kustomization.yml | 8 +++----- variants/non-prod/non-prod.yml | 7 ++++++- variants/non-prod/replicas.yml | 7 +++++++ variants/prod/kustomization.yml | 8 +++----- variants/prod/prod.yml | 6 +++++- variants/prod/replicas.yml | 7 +++++++ variants/us/kustomization.yml | 7 ++----- 13 files changed, 86 insertions(+), 27 deletions(-) create mode 100644 envs/integration-gpu/deployment.yml create mode 100644 envs/integration-gpu/kustomization.yml create mode 100644 envs/integration-gpu/replicas.yml create mode 100644 envs/integration-gpu/version.yml create mode 100644 variants/non-prod/replicas.yml create mode 100644 variants/prod/replicas.yml diff --git a/envs/integration-gpu/deployment.yml b/envs/integration-gpu/deployment.yml new file mode 100644 index 0000000..9d0750c --- /dev/null +++ b/envs/integration-gpu/deployment.yml @@ -0,0 +1,15 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simple-deployment +spec: + template: + spec: + containers: + - name: webserver-simple + env: + - name: ENV + value: "integration" + - name: GPU_ENABLED + value: "1" diff --git a/envs/integration-gpu/kustomization.yml b/envs/integration-gpu/kustomization.yml new file mode 100644 index 0000000..1500e5d --- /dev/null +++ b/envs/integration-gpu/kustomization.yml @@ -0,0 +1,16 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: integration + +resources: +- ../../base + +components: + - ../../variants/non-prod + +patchesStrategicMerge: +- deployment.yml +- version.yml +- replicas.yml + diff --git a/envs/integration-gpu/replicas.yml b/envs/integration-gpu/replicas.yml new file mode 100644 index 0000000..13c6a77 --- /dev/null +++ b/envs/integration-gpu/replicas.yml @@ -0,0 +1,7 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simple-deployment +spec: + replicas: 4 \ No newline at end of file diff --git a/envs/integration-gpu/version.yml b/envs/integration-gpu/version.yml new file mode 100644 index 0000000..0423d0f --- /dev/null +++ b/envs/integration-gpu/version.yml @@ -0,0 +1,11 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simple-deployment +spec: + template: + spec: + containers: + - name: webserver-simple + image: docker.io/kostiscodefresh/simple-env-app:2.0 diff --git a/variants/asia/kustomization.yml b/variants/asia/kustomization.yml index e30b32d..be5f687 100644 --- a/variants/asia/kustomization.yml +++ b/variants/asia/kustomization.yml @@ -1,8 +1,5 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: -- ../../base +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component patchesStrategicMerge: - region.yml diff --git a/variants/eu/kustomization.yml b/variants/eu/kustomization.yml index e30b32d..be5f687 100644 --- a/variants/eu/kustomization.yml +++ b/variants/eu/kustomization.yml @@ -1,8 +1,5 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: -- ../../base +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component patchesStrategicMerge: - region.yml diff --git a/variants/non-prod/kustomization.yml b/variants/non-prod/kustomization.yml index 0862ead..0fe728a 100644 --- a/variants/non-prod/kustomization.yml +++ b/variants/non-prod/kustomization.yml @@ -1,8 +1,6 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: -- ../../base +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component patchesStrategicMerge: - non-prod.yml +- replicas.yml diff --git a/variants/non-prod/non-prod.yml b/variants/non-prod/non-prod.yml index 453201e..bfe2a73 100644 --- a/variants/non-prod/non-prod.yml +++ b/variants/non-prod/non-prod.yml @@ -11,4 +11,9 @@ spec: env: - name: ENV_TYPE value: "non-prod" - + - name: PAYPAL_URL + value: "staging.paypal.com" + - name: DB_USER + value: "non-prod-user" + - name: DB_PASSWORD + value: "non-prod-password" \ No newline at end of file diff --git a/variants/non-prod/replicas.yml b/variants/non-prod/replicas.yml new file mode 100644 index 0000000..40bbc5c --- /dev/null +++ b/variants/non-prod/replicas.yml @@ -0,0 +1,7 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simple-deployment +spec: + replicas: 3 \ No newline at end of file diff --git a/variants/prod/kustomization.yml b/variants/prod/kustomization.yml index 2e41a35..1342875 100644 --- a/variants/prod/kustomization.yml +++ b/variants/prod/kustomization.yml @@ -1,8 +1,6 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: -- ../../base +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component patchesStrategicMerge: - prod.yml +- replicas.yml diff --git a/variants/prod/prod.yml b/variants/prod/prod.yml index 2e820b3..723be91 100644 --- a/variants/prod/prod.yml +++ b/variants/prod/prod.yml @@ -12,7 +12,11 @@ spec: - name: ENV_TYPE value: "production" - name: PAYPAL_URL - value: "production.paypal.com" + value: "production.paypal.com" + - name: DB_USER + value: "prod_username" + - name: DB_PASSWORD + value: "prod_password" livenessProbe: httpGet: path: /health diff --git a/variants/prod/replicas.yml b/variants/prod/replicas.yml new file mode 100644 index 0000000..40bbc5c --- /dev/null +++ b/variants/prod/replicas.yml @@ -0,0 +1,7 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simple-deployment +spec: + replicas: 3 \ No newline at end of file diff --git a/variants/us/kustomization.yml b/variants/us/kustomization.yml index e30b32d..be5f687 100644 --- a/variants/us/kustomization.yml +++ b/variants/us/kustomization.yml @@ -1,8 +1,5 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: -- ../../base +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component patchesStrategicMerge: - region.yml