Skip to content

Commit 1729472

Browse files
committed
Use ingress to manages external access to services within a cluster
Attempt to setup ingress which is already provided in the charts to provide access to the openQA services. Only of the advantages is that can expose the services under the same IP, as opposed to NodePort which can only have one service per port. * Replace traefik with nginx * prevent openqa-webui start too soon and before db * set the baseurl to openqa.example.com Signed-off-by: Ioannis Bonatakis <[email protected]>
1 parent 32aa54c commit 1729472

File tree

7 files changed

+10
-3
lines changed

7 files changed

+10
-3
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.

container/helm/charts/webui/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ spec:
1616
labels:
1717
{{- include "webui.selectorLabels" . | nindent 8 }}
1818
spec:
19+
initContainers:
20+
- name: wait-for-db
21+
image: "postgres:latest"
22+
command: ["sh", "-c", "until pg_isready -h db -p 5432; do echo waiting for database; sleep 2; done;"]
1923
containers:
2024
# Future enhancement option: a container with rsync for setup with cache service
2125
- name: {{ include "webui.fullname" . }}-scheduler

container/helm/charts/webui/templates/ingress.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Ingress
33
metadata:
44
name: {{ include "webui.fullname" . }}-ingress
55
spec:
6-
ingressClassName: traefik
6+
ingressClassName: {{ .Values.ingress.className }}
77
rules:
88
- host: {{ .Values.baseUrl }}
99
http:

container/helm/charts/webui/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
enabled: true
2-
baseUrl: openqa.host
2+
baseUrl: openqa.example.com
33
useHttps: false
44
key: 1234567890ABCDEF
55
secret: 1234567890ABCDEF
66
image:
77
name: registry.opensuse.org/devel/openqa/containers15.6/openqa_webui
88
pullPolicy: Always
99
tag: "latest"
10+
ingress:
11+
enabled: true
12+
className: "nginx"
1013
postgresql:
1114
enabled: true
1215
fullnameOverride: db

container/helm/charts/worker/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ image:
44
pullPolicy: Always
55
tag: "latest"
66
openqa:
7-
host: openqa.host
7+
host: openqa.example.com
88
key: 1234567890ABCDEF
99
secret: 1234567890ABCDEF
1010
cacheService: false

0 commit comments

Comments
 (0)