Skip to content

Commit

Permalink
Adding namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
BobJWalker committed Oct 18, 2023
1 parent 1db8918 commit eed89a3
Show file tree
Hide file tree
Showing 19 changed files with 75 additions and 4 deletions.
1 change: 1 addition & 0 deletions k8s/base/trident-app-cluster-ip-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: trident-app-cluster-ip-service
namespace: default
spec:
type: ClusterIP
selector:
Expand Down
1 change: 1 addition & 0 deletions k8s/base/trident-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: trident-deployment
namespace: default
spec:
replicas: 1
selector:
Expand Down
1 change: 1 addition & 0 deletions k8s/base/trident-ingress-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: trident-ingress-nginx
namespace: default
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
Expand Down
8 changes: 8 additions & 0 deletions k8s/overlays/development/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ resources:
- ../../base

patches:
- target:
kind: Deployment
name: trident-deployment
path: trident-deployment.yaml
- target:
kind: ClusterIP
name: trident-app-cluster-ip-service
path: trident-app-cluster-ip-service.yaml
- target:
kind: Ingress
name: trident-ingress-nginx
Expand Down
3 changes: 3 additions & 0 deletions k8s/overlays/development/trident-app-cluster-ip-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: replace
path: /metadata/namespace
value: development
3 changes: 3 additions & 0 deletions k8s/overlays/development/trident-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: replace
path: /metadata/namespace
value: development
5 changes: 4 additions & 1 deletion k8s/overlays/development/trident-ingress-nginx.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- op: replace
path: /spec/rules/0/host
value: tridentdev.local
value: tridentdev.local
- op: replace
path: /metadata/namespace
value: development
8 changes: 8 additions & 0 deletions k8s/overlays/production/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ resources:
- ../../base

patches:
- target:
kind: Deployment
name: trident-deployment
path: trident-deployment.yaml
- target:
kind: ClusterIP
name: trident-app-cluster-ip-service
path: trident-app-cluster-ip-service.yaml
- target:
kind: Ingress
name: trident-ingress-nginx
Expand Down
3 changes: 3 additions & 0 deletions k8s/overlays/production/trident-app-cluster-ip-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: replace
path: /metadata/namespace
value: production
3 changes: 3 additions & 0 deletions k8s/overlays/production/trident-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: replace
path: /metadata/namespace
value: production
5 changes: 4 additions & 1 deletion k8s/overlays/production/trident-ingress-nginx.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- op: replace
path: /spec/rules/0/host
value: tridentprod.local
value: tridentprod.local
- op: replace
path: /metadata/namespace
value: production
8 changes: 8 additions & 0 deletions k8s/overlays/staging/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ resources:
- ../../base

patches:
- target:
kind: Deployment
name: trident-deployment
path: trident-deployment.yaml
- target:
kind: ClusterIP
name: trident-app-cluster-ip-service
path: trident-app-cluster-ip-service.yaml
- target:
kind: Ingress
name: trident-ingress-nginx
Expand Down
3 changes: 3 additions & 0 deletions k8s/overlays/staging/trident-app-cluster-ip-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: replace
path: /metadata/namespace
value: staging
3 changes: 3 additions & 0 deletions k8s/overlays/staging/trident-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: replace
path: /metadata/namespace
value: staging
5 changes: 4 additions & 1 deletion k8s/overlays/staging/trident-ingress-nginx.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- op: replace
path: /spec/rules/0/host
value: tridentstaging.local
value: tridentstaging.local
- op: replace
path: /metadata/namespace
value: staging
8 changes: 8 additions & 0 deletions k8s/overlays/test/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ resources:
- ../../base

patches:
- target:
kind: Deployment
name: trident-deployment
path: trident-deployment.yaml
- target:
kind: ClusterIP
name: trident-app-cluster-ip-service
path: trident-app-cluster-ip-service.yaml
- target:
kind: Ingress
name: trident-ingress-nginx
Expand Down
3 changes: 3 additions & 0 deletions k8s/overlays/test/trident-app-cluster-ip-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: replace
path: /metadata/namespace
value: test
3 changes: 3 additions & 0 deletions k8s/overlays/test/trident-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: replace
path: /metadata/namespace
value: test
5 changes: 4 additions & 1 deletion k8s/overlays/test/trident-ingress-nginx.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- op: replace
path: /spec/rules/0/host
value: tridenttest.local
value: tridenttest.local
- op: replace
path: /metadata/namespace
value: test

0 comments on commit eed89a3

Please sign in to comment.