From 926ebc17da6a1b87f78d88fbad4c8a755d83ec59 Mon Sep 17 00:00:00 2001 From: Alexander Andryashin Date: Mon, 26 Feb 2024 15:14:30 +0300 Subject: [PATCH] Fix VNC on Openshift. --- moon2/templates/configs.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/moon2/templates/configs.yaml b/moon2/templates/configs.yaml index 6b8cd7b..6ebcb12 100644 --- a/moon2/templates/configs.yaml +++ b/moon2/templates/configs.yaml @@ -2,6 +2,15 @@ {{- $releaseNamespace := .Release.Namespace }} {{- range $name, $conf := .Values.configs }} +{{- if $.Values.ingress.openshift }} +{{- $containers := get $conf "containers" }} +{{- $vncServer := get $containers "vnc-server" }} +{{- $repo := get $vncServer "repository" }} +{{- if eq $repo "quay.io/aerokube/vnc-server" }} +{{- $_ := set $vncServer "repository" "quay.io/aerokube/vnc-server-openshift" }} +{{- $_ := set $conf.containers "vnc-server" $vncServer }} +{{- end }} +{{- end }} --- apiVersion: moon.aerokube.com/v1 kind: Config @@ -9,4 +18,4 @@ metadata: name: {{ $name }} namespace: {{ $releaseNamespace }} spec: {{- $conf | toYaml | nindent 2 }} -{{- end }} \ No newline at end of file +{{- end }}