Skip to content

Commit cf4baeb

Browse files
committed
[Helm] Fix some issues with new Shinyproxy version
1 parent a14e2fe commit cf4baeb

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{- define "gams-miro-server.v1.renderLabelsAsPatches" }}
2+
{{- $labelsList := . }}
3+
{{- range $i, $label := $labelsList -}}
4+
{{- if $i -}}{{- "\n" -}}{{- end -}}
5+
- op: add
6+
path: /metadata/labels/{{ $label.key | replace "~" "~0" | replace "/" "~1" }}
7+
value: {{ $label.value | quote }}
8+
{{- end -}}
9+
{{- end -}}

server/kubernetes/gams-miro-server/templates/cm-proxy.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ Copyright GAMS Development Corp. All Rights Reserved.
33
SPDX-License-Identifier: GPL-3.0-only
44
*/}}
55

6+
{{- $labelsDict := include "common.labels.standard" ( dict "customLabels" .Values.global.commonLabels "context" $ ) | fromYaml }}
7+
{{- $labelsList := list }}
8+
{{- range $k, $v := $labelsDict }}
9+
{{- $labelsList = append $labelsList (dict "key" $k "value" $v) }}
10+
{{- end }}
11+
612
apiVersion: v1
713
kind: ConfigMap
814
metadata:
@@ -19,7 +25,9 @@ data:
1925
theme: {{ .Values.proxy.config.colorTheme | quote }}
2026
template-path: ./templates/2col
2127
logo-path: /assets/imgk8s/logo.png
28+
{{- if .Values.proxy.config.favicon.enabled }}
2229
favicon-path: ./templates/2col/assets/imgk8s/favicon.ico
30+
{{- end }}
2331
specs-path: ./mnt/specs.yaml
2432
model-dir: /home/miroproxy/mnt/models
2533
data-dir: /home/miroproxy/mnt/data
@@ -122,11 +130,12 @@ data:
122130
value:
123131
{{- include "common.tplvalues.render" (dict "value" .Values.miro.podAnnotations "context" $) | nindent 14 }}
124132
{{- end }}
133+
{{- if $labelsList }}
134+
{{- include "gams-miro-server.v1.renderLabelsAsPatches" $labelsList | nindent 10 }}
135+
{{- end }}
125136
- op: add
126-
path: /metadata/labels
127-
value:
128-
{{- include "common.labels.standard" ( dict "customLabels" .Values.global.commonLabels "context" $ ) | nindent 14 }}
129-
miro.gams.com/app-name: "{{ include "common.names.fullname" . }}-ui"
137+
path: /metadata/labels/miro.gams.com~1app-name
138+
value: "{{ include "common.names.fullname" . }}-ui"
130139
{{- if .Values.global.nodeSelector }}
131140
- op: add
132141
path: /spec/nodeSelector
@@ -199,11 +208,12 @@ data:
199208
value:
200209
{{- include "common.tplvalues.render" (dict "value" .Values.admin.podAnnotations "context" $) | nindent 14 }}
201210
{{- end }}
211+
{{- if $labelsList }}
212+
{{- include "gams-miro-server.v1.renderLabelsAsPatches" $labelsList | nindent 10 }}
213+
{{- end }}
202214
- op: add
203-
path: /metadata/labels
204-
value:
205-
{{- include "common.labels.standard" ( dict "customLabels" .Values.global.commonLabels "context" $ ) | nindent 14 }}
206-
miro.gams.com/app-name: "{{ include "common.names.fullname" . }}-admin"
215+
path: /metadata/labels/miro.gams.com~1app-name
216+
value: "{{ include "common.names.fullname" . }}-admin"
207217
{{- if .Values.global.nodeSelector }}
208218
- op: add
209219
path: /spec/nodeSelector

0 commit comments

Comments
 (0)