Skip to content

Commit 15339b4

Browse files
committed
feat: separate prod environments
1 parent 644ac63 commit 15339b4

File tree

12 files changed

+132
-103
lines changed

12 files changed

+132
-103
lines changed

k8s/base/digital-twin/simulator.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,13 @@ spec:
3636
value: https://vroom.predictivemovement.se
3737
- name: ELASTICSEARCH_URL
3838
value: http://elasticsearch.elasticsearch:9200
39-
- name: PROJECT_NAME
40-
value: helsingborg
4139
- name: STREAMS_URL
4240
value: http://sample-address.pm-streams:4001
4341
---
4442
apiVersion: networking.k8s.io/v1
4543
kind: Ingress
4644
metadata:
47-
name: simulator-ingress-helsingborg
45+
name: simulator-ingress
4846
annotations:
4947
kubernetes.io/ingress.class: "nginx"
5048
cert-manager.io/cluster-issuer: "letsencrypt-prod"
@@ -56,7 +54,7 @@ spec:
5654
- tvilling-stage.predictivemovement.se
5755
- helsingborg-stage.predictivemovement.se # Legacy.
5856
- rorla-stage.predictivemovement.se # Legacy.
59-
secretName: helsingborg-stage-tls
57+
secretName: simulator-stage-tls
6058
rules:
6159
- host: tvilling-stage.predictivemovement.se
6260
http:
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
namespace: helsingborg
5+
6+
resources:
7+
- ../../base/digital-twin
8+
9+
patches:
10+
- path: visualisation.yaml
11+
- path: simulator.yaml
12+
- patch: |-
13+
- op: add
14+
path: /spec/template/spec/containers/0/env/-
15+
value:
16+
name: REGION
17+
value: "skane"
18+
target:
19+
kind: Deployment
20+
name: simulator
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: Ingress
3+
metadata:
4+
name: simulator-ingress
5+
spec:
6+
tls:
7+
- hosts:
8+
- helsingborg.predictivemovement.se # Legacy.
9+
secretName: helsingborg-prod-tls
10+
rules:
11+
- host: helsingborg.predictivemovement.se
12+
http:
13+
paths:
14+
- path: /socket.io
15+
pathType: Prefix
16+
backend:
17+
service:
18+
name: simulator
19+
port:
20+
number: 4000
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: Ingress
3+
metadata:
4+
name: visualisation-ingress
5+
spec:
6+
tls:
7+
- hosts:
8+
- helsingborg.predictivemovement.se
9+
secretName: helsingborg-prod-tls
10+
rules:
11+
- host: helsingborg.predictivemovement.se
12+
http:
13+
paths:
14+
- path: /
15+
pathType: Prefix
16+
backend:
17+
service:
18+
name: visualisation
19+
port:
20+
number: 80

k8s/overlays/prod/kustomization.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

k8s/overlays/prod/simulator.yaml

Lines changed: 0 additions & 42 deletions
This file was deleted.

k8s/overlays/prod/visualisation.yaml

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
namespace: rorla
5+
6+
resources:
7+
- ../../base/digital-twin
8+
9+
patches:
10+
- path: visualisation.yaml
11+
- path: simulator.yaml
12+
- patch: |-
13+
- op: add
14+
path: /spec/template/spec/containers/0/env/-
15+
value:
16+
name: REGION
17+
value: "norrbotten"
18+
target:
19+
kind: Deployment
20+
name: simulator

k8s/overlays/rorla/simulator.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: Ingress
3+
metadata:
4+
name: simulator-ingress
5+
spec:
6+
tls:
7+
- hosts:
8+
- rorla.predictivemovement.se # Legacy.
9+
secretName: rorla-prod-tls
10+
rules:
11+
- host: rorla.predictivemovement.se
12+
http:
13+
paths:
14+
- path: /socket.io
15+
pathType: Prefix
16+
backend:
17+
service:
18+
name: simulator
19+
port:
20+
number: 4000
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: Ingress
3+
metadata:
4+
name: visualisation-ingress
5+
spec:
6+
tls:
7+
- hosts:
8+
- rorla.predictivemovement.se
9+
secretName: rorla-prod-tls
10+
rules:
11+
- host: rorla.predictivemovement.se
12+
http:
13+
paths:
14+
- path: /
15+
pathType: Prefix
16+
backend:
17+
service:
18+
name: visualisation
19+
port:
20+
number: 80

0 commit comments

Comments
 (0)