Skip to content

Commit

Permalink
First env
Browse files Browse the repository at this point in the history
  • Loading branch information
kostis-codefresh committed Mar 11, 2022
1 parent 68e4307 commit 5541297
Show file tree
Hide file tree
Showing 13 changed files with 86 additions and 27 deletions.
15 changes: 15 additions & 0 deletions envs/integration-gpu/deployment.yml
Original file line number Diff line number Diff line change
@@ -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"
16 changes: 16 additions & 0 deletions envs/integration-gpu/kustomization.yml
Original file line number Diff line number Diff line change
@@ -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

7 changes: 7 additions & 0 deletions envs/integration-gpu/replicas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: simple-deployment
spec:
replicas: 4
11 changes: 11 additions & 0 deletions envs/integration-gpu/version.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 2 additions & 5 deletions variants/asia/kustomization.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 2 additions & 5 deletions variants/eu/kustomization.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 3 additions & 5 deletions variants/non-prod/kustomization.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 6 additions & 1 deletion variants/non-prod/non-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
7 changes: 7 additions & 0 deletions variants/non-prod/replicas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: simple-deployment
spec:
replicas: 3
8 changes: 3 additions & 5 deletions variants/prod/kustomization.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 5 additions & 1 deletion variants/prod/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions variants/prod/replicas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: simple-deployment
spec:
replicas: 3
7 changes: 2 additions & 5 deletions variants/us/kustomization.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5541297

Please sign in to comment.