Skip to content

Commit

Permalink
improve overlays to visually differentiate between environments
Browse files Browse the repository at this point in the history
Signed-off-by: Kent <[email protected]>
  • Loading branch information
krancour committed May 16, 2023
1 parent aa21f54 commit a0e81ad
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 0 deletions.
8 changes: 8 additions & 0 deletions base/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ spec:
containers:
- name: nginx
image: nginx:placeholder
volumeMounts:
- name: content
mountPath: /usr/share/nginx/html
readOnly: true
volumes:
- name: content
configMap:
name: kargo-demo-content
1 change: 1 addition & 0 deletions base/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ spec:
- protocol: TCP
port: 3000
targetPort: 80
nodePort: placeholder
17 changes: 17 additions & 0 deletions env/prod/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: kargo-demo-content
data:
index.html: |-
<!DOCTYPE html>
<html>
<head>
<title>prod</title>
</head>
<body>
<h1>prod</h1>
</body>
</html>
10 changes: 10 additions & 0 deletions env/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ kind: Kustomization

resources:
- ../../base
- configmap.yaml

patches:
- target:
kind: Service
name: kargo-demo
patch: |-
- op: replace
path: /spec/ports/0/nodePort
value: 30083
17 changes: 17 additions & 0 deletions env/stage/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: kargo-demo-content
data:
index.html: |-
<!DOCTYPE html>
<html>
<head>
<title>stage</title>
</head>
<body>
<h1>stage</h1>
</body>
</html>
10 changes: 10 additions & 0 deletions env/stage/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ kind: Kustomization

resources:
- ../../base
- configmap.yaml

patches:
- target:
kind: Service
name: kargo-demo
patch: |-
- op: replace
path: /spec/ports/0/nodePort
value: 30082
17 changes: 17 additions & 0 deletions env/test/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: kargo-demo-content
data:
index.html: |-
<!DOCTYPE html>
<html>
<head>
<title>test</title>
</head>
<body>
<h1>test</h1>
</body>
</html>
10 changes: 10 additions & 0 deletions env/test/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ kind: Kustomization

resources:
- ../../base
- configmap.yaml

patches:
- target:
kind: Service
name: kargo-demo
patch: |-
- op: replace
path: /spec/ports/0/nodePort
value: 30081

0 comments on commit a0e81ad

Please sign in to comment.