Skip to content

Commit

Permalink
fix: update to drop user and add ENV-DOMAIN
Browse files Browse the repository at this point in the history
  • Loading branch information
ehaselwanter committed May 10, 2023
1 parent 526b29b commit ce4f6bf
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 20 deletions.
4 changes: 2 additions & 2 deletions examples/kubernetes/all-in-one/12-factor-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ spec:
entryPoints:
- web
routes:
- match: Host(`k8s.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training`) && PathPrefix(`/`)
- match: Host(`k8s.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix(`/`)
kind: Rule
services:
- name: api
Expand All @@ -311,7 +311,7 @@ spec:
tls:
certResolver: myresolver
routes:
- match: Host(`k8s.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training`) && PathPrefix(`/`)
- match: Host(`k8s.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix(`/`)
kind: Rule
services:
- name: api
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/chaos-engeneering/chaos-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
tls:
certResolver: myresolver
routes:
- match: Host(`chaos.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training`) && PathPrefix(`/`)
- match: Host(`chaos.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix(`/`)
kind: Rule
services:
- name: chaos-dashboard
Expand Down
4 changes: 2 additions & 2 deletions examples/kubernetes/efk/elastic-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
tls:
- secretName: elasticsearch-tls
rules:
- host: elastic.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training
- host: elastic.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>
http:
paths:
- path: /
Expand All @@ -38,7 +38,7 @@ metadata:
traefik.ingress.kubernetes.io/router.entrypoints: web
spec:
rules:
- host: elastic.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training
- host: elastic.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>
http:
paths:
- path: /
Expand Down
4 changes: 2 additions & 2 deletions examples/kubernetes/efk/kibana-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
tls:
- secretName: kibana-tls
rules:
- host: kibana.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training
- host: kibana.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>
http:
paths:
- path: /
Expand All @@ -38,7 +38,7 @@ metadata:
traefik.ingress.kubernetes.io/router.entrypoints: web
spec:
rules:
- host: kibana.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training
- host: kibana.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>
http:
paths:
- path: /
Expand Down
6 changes: 3 additions & 3 deletions examples/kubernetes/keptn-lifecycle-toolkit/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
entryPoints:
- web
routes:
- match: Host(`jaeger.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training`) && PathPrefix(`/`)
- match: Host(`jaeger.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix(`/`)
kind: Rule
services:
- name: jaeger-query
Expand All @@ -22,7 +22,7 @@ spec:
entryPoints:
- web
routes:
- match: Host(`prom.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training`) && PathPrefix(`/`)
- match: Host(`prom.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix(`/`)
kind: Rule
services:
- name: prometheus-k8s
Expand All @@ -37,7 +37,7 @@ spec:
entryPoints:
- websecure
routes:
- match: Host(`grafana.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training`) && PathPrefix(`/`)
- match: Host(`grafana.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix(`/`)
kind: Rule
services:
- name: grafana
Expand Down
4 changes: 2 additions & 2 deletions examples/kubernetes/prometheus/grafana-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
entryPoints:
- web
routes:
- match: Host(`grafana.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training`) && PathPrefix(`/`)
- match: Host(`grafana.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix(`/`)
kind: Rule
services:
- name: prometheus-grafana
Expand All @@ -25,7 +25,7 @@ spec:
tls:
certResolver: myresolver
routes:
- match: Host(`grafana.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training`) && PathPrefix(`/`)
- match: Host(`grafana.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix(`/`)
kind: Rule
services:
- name: prometheus-grafana
Expand Down
4 changes: 2 additions & 2 deletions examples/kubernetes/prometheus/prometheus-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
traefik.ingress.kubernetes.io/router.entrypoints: web
spec:
rules:
- host: prom.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training
- host: prom.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>
http:
paths:
- path: /
Expand All @@ -25,7 +25,7 @@ metadata:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
spec:
rules:
- host: prom.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training
- host: prom.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>
http:
paths:
- path: /
Expand Down
4 changes: 2 additions & 2 deletions examples/kubernetes/tracing/jaeger-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
entryPoints:
- web
routes:
- match: Host(`jaeger.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training`) && PathPrefix(`/`)
- match: Host(`jaeger.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix(`/`)
kind: Rule
services:
- name: simplest-query
Expand All @@ -24,7 +24,7 @@ spec:
tls:
certResolver: myresolver
routes:
- match: Host(`jaeger.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training`) && PathPrefix(`/`)
- match: Host(`jaeger.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix(`/`)
kind: Rule
services:
- name: simplest-query
Expand Down
4 changes: 2 additions & 2 deletions examples/kubernetes/traefik/traefik-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
entryPoints:
- web
routes:
- match: Host(`traefik.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training`) && PathPrefix('/dashboard')
- match: Host(`traefik.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix('/dashboard')
kind: Rule
services:
- name: traefik-dashboard
Expand All @@ -24,7 +24,7 @@ spec:
- web
routes:
- kind: Rule
match: Host(`traefik.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training`) && PathPrefix(`/metrics`)
match: Host(`traefik.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix(`/metrics`)
services:
- name: prometheus@internal
kind: TraefikService
4 changes: 2 additions & 2 deletions examples/whoami/whoami.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
tls:
certResolver: myresolver
routes:
- match: Host(`whoami.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training`) && PathPrefix(`/`)
- match: Host(`whoami.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix(`/`)
kind: Rule
services:
- name: whoami
Expand All @@ -65,7 +65,7 @@ spec:
entryPoints:
- web
routes:
- match: Host(`whoami.<ENV-NAME>-user-<ENV-USER-ID>-01.<ENV-ANIMAL>.commandemy.training`) && PathPrefix(`/`)
- match: Host(`whoami.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix(`/`)
kind: Rule
services:
- name: whoami
Expand Down
3 changes: 3 additions & 0 deletions replace-variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ find examples* -type f -exec sed -i -e "s/<ENV-IP>/$HOST_IP/g" {} \;

# Replace <ENV-NAME>
find examples* -type f -exec sed -i -e "s/<ENV-NAME>/$ENVIRONMENT/g" {} \;

# Replace <ENV-DOMAIN>
find examples* -type f -exec sed -i -e "s/<ENV-DOMAIN>/$DOMAIN/g" {} \;

0 comments on commit ce4f6bf

Please sign in to comment.