Skip to content

Commit

Permalink
Use generators
Browse files Browse the repository at this point in the history
  • Loading branch information
kostis-codefresh committed Dec 28, 2022
1 parent 8acf7c9 commit 5e5a0ec
Show file tree
Hide file tree
Showing 17 changed files with 44 additions and 179 deletions.
3 changes: 3 additions & 0 deletions environment-promotion/base/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ spec:
env:
- name: REGION
value: "us"
envFrom:
- configMapRef:
name: example-configmap

7 changes: 7 additions & 0 deletions environment-promotion/envs/prod/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
UI_THEME=dark
CACHE_SIZE=1024kb
PAGE_LIMIT=25
SORTING=ascending
N_BUCKETS=12


8 changes: 7 additions & 1 deletion environment-promotion/envs/prod/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ patchesStrategicMerge:
- deployment.yml
- version.yml
- replicas.yml
- settings.yml
- service.yml


configMapGenerator:
- name: example-configmap
behavior: merge
envs:
- application.properties

21 changes: 0 additions & 21 deletions environment-promotion/envs/prod/settings.yml

This file was deleted.

7 changes: 5 additions & 2 deletions environment-promotion/envs/qa/application.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
SHARED=QA
EXTRA=QA
UI_THEME=light
CACHE_SIZE=2048kb
PAGE_LIMIT=25
SORTING=ascending
N_BUCKETS=42
1 change: 0 additions & 1 deletion environment-promotion/envs/qa/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ components:
patchesStrategicMerge:
- deployment.yml
- version.yml
- settings.yml
- service.yml

configMapGenerator:
Expand Down
21 changes: 0 additions & 21 deletions environment-promotion/envs/qa/settings.yml

This file was deleted.

9 changes: 7 additions & 2 deletions environment-promotion/envs/staging/application.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
SHARED=STAGING
EXTRA=STAGING
UI_THEME=light
CACHE_SIZE=1024kb
PAGE_LIMIT=25
SORTING=ascending
N_BUCKETS=24


1 change: 0 additions & 1 deletion environment-promotion/envs/staging/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ patchesStrategicMerge:
- deployment.yml
- version.yml
- replicas.yml
- settings.yml
- service.yml

configMapGenerator:
Expand Down
21 changes: 0 additions & 21 deletions environment-promotion/envs/staging/settings.yml

This file was deleted.

77 changes: 0 additions & 77 deletions environment-promotion/qa.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
SHARED=NO_PROD
LAST=NO_PROD
ENV_TYPE=non-prod
PAYPAL_URL=staging2.paypal.com
DB_USER=non-prod-user
DB_PASSWORD=non-prod-password
1 change: 0 additions & 1 deletion environment-promotion/variants/non-prod/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

patchesStrategicMerge:
- non-prod.yml
- replicas.yml


Expand Down
19 changes: 0 additions & 19 deletions environment-promotion/variants/non-prod/non-prod.yml

This file was deleted.

6 changes: 6 additions & 0 deletions environment-promotion/variants/prod/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ENV_TYPE=production
PAYPAL_URL=production.paypal.com
DB_USER=prod_username
DB_PASSWORD=prod_password


4 changes: 4 additions & 0 deletions environment-promotion/variants/prod/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ kind: Component
patchesStrategicMerge:
- prod.yml

configMapGenerator:
- name: example-configmap
envs:
- application.properties
11 changes: 1 addition & 10 deletions environment-promotion/variants/prod/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,7 @@ spec:
template:
spec:
containers:
- name: webserver-simple
env:
- name: ENV_TYPE
value: "production"
- name: PAYPAL_URL
value: "production.paypal.com"
- name: DB_USER
value: "prod_username"
- name: DB_PASSWORD
value: "prod_password"
- name: webserver-simple
livenessProbe:
httpGet:
path: /health
Expand Down

0 comments on commit 5e5a0ec

Please sign in to comment.