Skip to content

Commit 12f31fc

Browse files
committed
Provide /var/lib/openqa/share mount point in helm charts
Some work on the worker charts. The worker container is configured to wait for the webui pods before try to run itself. in its configuration will try to connect using the internal Kubernetes network. However it fails to connect as for now. This is might be due to the ingress-nginx and because the webui container sets up an apache proxy. poo: https://progress.opensuse.org/issues/183608 Signed-off-by: Ioannis Bonatakis <[email protected]>
1 parent 64f456b commit 12f31fc

File tree

5 files changed

+24
-4
lines changed

5 files changed

+24
-4
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ data:
1717
[{{ .Chart.Name }}-websockets]
1818
key = {{ .Values.key }}
1919
secret = {{ .Values.secret }}
20+
21+
[{{ .Release.Name }}-webui:9529]
22+
key = {{ .Values.key }}
23+
secret = {{ .Values.secret }}
2024
database_ini: |
2125
[production]
2226
dsn = DBI:Pg:dbname={{ .Values.postgresql.auth.database }};host=db;user={{ .Values.postgresql.auth.username }};password={{ .Values.postgresql.auth.password }}
@@ -30,7 +34,7 @@ data:
3034
base_url = {{ .Values.useHttps | ternary "https://" "http://" }}{{ .Values.baseUrl }}
3135
3236
[auth]
33-
method = OpenID
37+
method = Fake
3438
3539
[logging]
3640
level = info

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ spec:
2020
- name: wait-for-db
2121
image: "postgres:latest"
2222
command: ["sh", "-c", "until pg_isready -h db -p 5432; do echo waiting for database; sleep 2; done;"]
23+
- name: setup-factory-dirs
24+
image: "busybox:latest"
25+
command: ["sh", "-c", "mkdir -p /var/lib/openqa/share/factory/hdd /var/lib/openqa/share/factory/iso /var/lib/openqa/share/factory/repos /var/lib/openqa/share/factory/tmp /var/lib/openqa/share/factory/other"]
26+
volumeMounts:
27+
- name: factory-data
28+
mountPath: /var/lib/openqa/share/factory
2329
containers:
2430
# Future enhancement option: a container with rsync for setup with cache service
2531
- name: {{ include "webui.fullname" . }}-scheduler
@@ -109,6 +115,8 @@ spec:
109115
- name: config
110116
mountPath: /data/conf
111117
readOnly: true
118+
- name: factory-data
119+
mountPath: /var/lib/openqa/share/factory
112120
env:
113121
- name: MODE
114122
value: "webui"
@@ -135,3 +143,5 @@ spec:
135143
path: openqa.ini
136144
- key: database_ini
137145
path: database.ini
146+
- name: factory-data
147+
emptyDir: {}

container/helm/charts/worker/templates/configmap.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
data:
88
workers_ini: |
99
[global]
10-
HOST = {{ .Values.openqa.host }}
10+
HOST = {{ .Release.Name }}-webui:9529
1111
BACKEND = qemu
1212
{{ if .Values.workerClass -}}
1313
WORKER_CLASS = {{ .Values.workerClass }}
@@ -21,6 +21,9 @@ data:
2121
TESTPOOLSERVER = rsync://{{ .Values.openqa.host }}/tests
2222
{{ end }}
2323
client_conf: |
24-
[{{ .Values.openqa.host }}]
24+
[localhost]
25+
key = {{ .Values.openqa.key }}
26+
secret = {{ .Values.openqa.secret }}
27+
[{{ .Release.Name }}-webui:9529]
2528
key = {{ .Values.openqa.key }}
2629
secret = {{ .Values.openqa.secret }}

container/helm/charts/worker/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 "worker.selectorLabels" . | nindent 8 }}
1818
spec:
19+
initContainers:
20+
- name: wait-for-webui
21+
image: busybox:latest
22+
command: ['sh', '-c', 'until nc -vz {{ .Release.Name }}-webui 9526; do echo "Waiting for webui service"; sleep 15; done;']
1923
# Future enhancement option: initContainer for git-pulling tests into /data
2024
containers:
2125
{{ if .Values.cacheService -}}

container/helm/charts/worker/values.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ image:
44
pullPolicy: Always
55
tag: "latest"
66
openqa:
7-
host: openqa.host.org
87
key: 1234567890ABCDEF
98
secret: 1234567890ABCDEF
109
cacheService: false

0 commit comments

Comments
 (0)