Skip to content

Commit

Permalink
feat(k8s): add ingress as standard kustomization
Browse files Browse the repository at this point in the history
Due to issue in kustomize (kubernetes-sigs/kustomize#347), I ducplicate the whole ingress in the kserver customization.
  • Loading branch information
davinkevin committed Aug 31, 2019
1 parent 145656b commit 9ca4be5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
21 changes: 21 additions & 0 deletions backend/src/main/k8s/base/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: podcast-server
spec:
rules:
- name: podcast-server
http:
paths:
- path: /api
backend:
serviceName: podcast-server
servicePort: 8080
- path: /data
backend:
serviceName: fs
servicePort: 80
- path: /
backend:
serviceName: ui
servicePort: 80
1 change: 1 addition & 0 deletions backend/src/main/k8s/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ resources:
- database.yaml
- ui.yaml
- fs.yaml
- ingress.yaml
3 changes: 1 addition & 2 deletions backend/src/main/k8s/kserver/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: ingress
namespace: podcast-server
name: podcast-server
spec:
tls:
- hosts:
Expand Down
2 changes: 1 addition & 1 deletion backend/src/main/k8s/kserver/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ namespace: podcast-server

resources:
- ../base/
- ingress.yaml

patchesStrategicMerge:
- backend.yaml
- database.yaml
- fs.yaml
- ingress.yaml

configMapGenerator:
- files:
Expand Down

0 comments on commit 9ca4be5

Please sign in to comment.