Skip to content

Commit 6af8daf

Browse files
committed
K8s: Update default component ConfigMap and resources limits
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 9ab8d6d commit 6af8daf

12 files changed

+145
-42
lines changed

charts/selenium-grid/CONFIGURATION.md

Lines changed: 20 additions & 13 deletions
Large diffs are not rendered by default.

charts/selenium-grid/templates/_nameHelpers.tpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ Session Map ConfigMap fullname
9898
{{- tpl (default (include "seleniumGrid.component.name" (list "selenium-session-map-config" $)) .Values.sessionMapConfigMap.nameOverride) $ | trunc 63 | trimSuffix "-" -}}
9999
{{- end -}}
100100

101+
{{/*
102+
Session Queue ConfigMap fullname
103+
*/}}
104+
{{- define "seleniumGrid.sessionQueue.configmap.fullname" -}}
105+
{{- tpl (default (include "seleniumGrid.component.name" (list "selenium-session-queue-config" $)) .Values.sessionQueueConfigMap.nameOverride) $ | trunc 63 | trimSuffix "-" -}}
106+
{{- end -}}
107+
101108
{{/*
102109
Router fullname
103110
*/}}

charts/selenium-grid/templates/distributor-configmap.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ data:
2828
{{- $fileName | nindent 2 -}}: {{- toYaml (default "" $value) | indent 4 }}
2929
{{- end }}
3030
{{- end }}
31+
{{- range $key, $value := $.Values.distributorConfigMap.data }}
32+
{{ $key }}: {{ tpl $value $ | quote }}
33+
{{- end }}

charts/selenium-grid/templates/event-bus-configmap.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ data:
1818
SE_EVENT_BUS_HOST: {{ $eventBusHost | quote }}
1919
SE_EVENT_BUS_PUBLISH_PORT: {{ $eventBusPublishPort | quote }}
2020
SE_EVENT_BUS_SUBSCRIBE_PORT: {{ $eventBusSubscribePort | quote }}
21-
{{- with .Values.busConfigMap.data }}
22-
{{- tpl (toYaml .) $ | nindent 2 }}
21+
{{- range $key, $value := $.Values.busConfigMap.data }}
22+
{{ $key }}: {{ tpl $value $ | quote }}
2323
{{- end }}

charts/selenium-grid/templates/logging-configmap.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ data:
2121
SE_OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: {{ .Values.tracing.globalAutoConfigure | quote }}
2222
SE_OTEL_EXPORTER_ENDPOINT: {{ tpl .Values.tracing.exporterEndpoint $ | quote }}
2323
{{- end }}
24+
{{- range $key, $value := $.Values.loggingConfigMap.data }}
25+
{{ $key }}: {{ tpl $value $ | quote }}
26+
{{- end }}

charts/selenium-grid/templates/node-configmap.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ data:
4141
SE_BROWSER_LEFTOVERS_TEMPFILES_DAYS: '{{ . }}'
4242
{{- end }}
4343
{{- end }}
44-
{{- with .Values.nodeConfigMap.data }}
45-
{{- tpl (toYaml .) $ | nindent 2 }}
46-
{{- end }}
4744
{{- $fileProceeded := list -}}
4845
{{- range $path, $_ := .Files.Glob $.Values.nodeConfigMap.extraScriptsImportFrom }}
4946
{{- $fileName := base $path -}}
@@ -60,3 +57,6 @@ data:
6057
{{- $fileName | nindent 2 -}}: {{- toYaml (default "" $value) | indent 4 }}
6158
{{- end }}
6259
{{- end }}
60+
{{- range $key, $value := $.Values.nodeConfigMap.data }}
61+
{{ $key }}: {{ tpl $value $ | quote }}
62+
{{- end }}

charts/selenium-grid/templates/router-configmap.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ data:
2929
{{- $fileName | nindent 2 -}}: {{- toYaml (default "" $value) | indent 4 }}
3030
{{- end }}
3131
{{- end }}
32+
{{- range $key, $value := $.Values.routerConfigMap.data }}
33+
{{ $key }}: {{ tpl $value $ | quote }}
34+
{{- end }}

charts/selenium-grid/templates/secrets.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ metadata:
1414
{{- end }}
1515
type: Opaque
1616
data:
17-
{{- range $name, $value := .Values.secrets.env }}
18-
{{- if not (empty $value) }}
19-
{{- $_ := set $ "name" $name }}
20-
{{- $_ := set $ "value" $value }}
21-
{{ $name }}: {{ tpl ($value) $ | b64enc }}
22-
{{- end }}
23-
{{- end }}
2417
SE_NODE_GRID_URL: {{ include "seleniumGrid.url" $ | b64enc }}
2518
SE_NODE_GRID_GRAPHQL_URL: {{ include "seleniumGrid.graphqlURL" $ | b64enc }}
2619
{{- with $.Values.tls.trustStorePassword }}
@@ -49,4 +42,11 @@ data:
4942
{{- end }}
5043
{{- end }}
5144
{{- end }}
45+
{{- range $name, $value := .Values.secrets.data }}
46+
{{- if not (empty $value) }}
47+
{{- $_ := set $ "name" $name }}
48+
{{- $_ = set $ "value" $value }}
49+
{{ $name }}: {{ tpl ($value) $ | b64enc }}
50+
{{- end }}
51+
{{- end }}
5252
{{- end }}

charts/selenium-grid/templates/server-configmap.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: ConfigMap
33
metadata:
44
name: {{ template "seleniumGrid.server.configmap.fullname" . }}
55
namespace: {{ .Release.Namespace }}
6-
{{- with .Values.busConfigMap.annotations }}
6+
{{- with .Values.serverConfigMap.annotations }}
77
annotations: {{- toYaml . | nindent 4 }}
88
{{- end }}
99
labels:
@@ -21,6 +21,6 @@ data:
2121
SE_JAVA_SSL_TRUST_STORE_PASSWORD: {{ printf "%s/%s" .Values.tls.certVolumeMountPath .Values.tls.trustStorePasswordFile | quote }}
2222
SE_JAVA_DISABLE_HOSTNAME_VERIFICATION: {{ .Values.tls.disableHostnameVerification | quote }}
2323
{{- end }}
24-
{{- range $key, $value := .Values.serverConfigMap.env }}
25-
{{ $key }}: {{ $value | quote }}
24+
{{- range $key, $value := $.Values.serverConfigMap.data }}
25+
{{ $key }}: {{ tpl $value $ | quote }}
2626
{{- end }}

charts/selenium-grid/templates/session-map-configmap.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,7 @@ data:
4242
{{- else }}
4343
SE_SESSIONS_MAP_EXTERNAL_DATASTORE: "false"
4444
{{- end }}
45+
{{- range $key, $value := $.Values.sessionMapConfigMap.data }}
46+
{{ $key }}: {{ tpl $value $ | quote }}
47+
{{- end }}
4548
{{- end }}

0 commit comments

Comments
 (0)