|
1 |
| -{{- if and .Values.chromeNode.enabled ((eq (include "seleniumGrid.useKEDA" .) "true") | ternary (eq .Values.autoscaling.scalingType "deployment") .Values.chromeNode.deploymentEnabled) }} |
| 1 | +{{- range $i, $newNode := .Values.crossBrowsers.chromeNode }} |
| 2 | +{{- $nodeConfig := merge $newNode $.Values.chromeNode -}} |
| 3 | +{{- if and $nodeConfig.enabled ((eq (include "seleniumGrid.useKEDA" $) "true") | ternary (eq $.Values.autoscaling.scalingType "deployment") $nodeConfig.deploymentEnabled) }} |
2 | 4 | apiVersion: apps/v1
|
3 | 5 | kind: Deployment
|
4 | 6 | metadata:
|
5 |
| - name: {{ template "seleniumGrid.chromeNode.fullname" . }} |
6 |
| - namespace: {{ .Release.Namespace }} |
| 7 | + name: {{ template "seleniumGrid.chromeNode.fullname" (list $nodeConfig $) }} |
| 8 | + namespace: {{ $.Release.Namespace }} |
7 | 9 | labels:
|
8 |
| - app: {{ template "seleniumGrid.chromeNode.fullname" . }} |
9 |
| - app.kubernetes.io/name: {{ template "seleniumGrid.chromeNode.fullname" . }} |
10 |
| - {{- include "seleniumGrid.commonLabels" . | nindent 4 }} |
11 |
| - {{- with .Values.chromeNode.labels }} |
| 10 | + app: {{ template "seleniumGrid.chromeNode.fullname" (list $nodeConfig $) }} |
| 11 | + app.kubernetes.io/name: {{ template "seleniumGrid.chromeNode.fullname" (list $nodeConfig $) }} |
| 12 | + {{- include "seleniumGrid.commonLabels" $ | nindent 4 }} |
| 13 | + {{- with $nodeConfig.labels }} |
12 | 14 | {{- toYaml . | nindent 4 }}
|
13 | 15 | {{- end }}
|
14 |
| - {{- with .Values.customLabels }} |
| 16 | + {{- with $.Values.customLabels }} |
15 | 17 | {{- toYaml . | nindent 4 }}
|
16 | 18 | {{- end }}
|
17 | 19 | spec:
|
18 | 20 | strategy:
|
19 |
| - {{- template "seleniumGrid.updateStrategy" (list $.Values.chromeNode $.Values.global.seleniumGrid) }} |
| 21 | + {{- template "seleniumGrid.updateStrategy" (list $nodeConfig $.Values.global.seleniumGrid) }} |
20 | 22 | {{- if not (eq (include "seleniumGrid.useKEDA" $) "true") }}
|
21 |
| - replicas: {{ .Values.chromeNode.replicas }} |
| 23 | + replicas: {{ $nodeConfig.replicas }} |
22 | 24 | {{- else }}
|
23 |
| - replicas: {{ default $.Values.autoscaling.scaledOptions.minReplicaCount ($.Values.chromeNode.scaledOptions).minReplicaCount }} |
| 25 | + replicas: {{ default $.Values.autoscaling.scaledOptions.minReplicaCount ($nodeConfig.scaledOptions).minReplicaCount }} |
24 | 26 | {{- end }}
|
25 |
| - revisionHistoryLimit: {{ .Values.global.seleniumGrid.revisionHistoryLimit }} |
| 27 | + revisionHistoryLimit: {{ $.Values.global.seleniumGrid.revisionHistoryLimit }} |
26 | 28 | selector:
|
27 | 29 | matchLabels:
|
28 |
| - app: {{ template "seleniumGrid.chromeNode.fullname" . }} |
29 |
| - app.kubernetes.io/instance: {{ .Release.Name }} |
30 |
| -{{- $podScope := deepCopy . -}} |
31 |
| -{{- $_ := set $podScope "name" (include "seleniumGrid.chromeNode.fullname" .) -}} |
32 |
| -{{- $_ = set $podScope "node" .Values.chromeNode -}} |
33 |
| -{{- $_ = set $podScope "recorder" (mergeOverwrite .Values.videoRecorder .Values.chromeNode.videoRecorder) -}} |
34 |
| -{{- $_ = set $podScope "uploader" (get .Values.videoRecorder ($podScope.recorder.uploader.name | toString)) -}} |
| 30 | + app: {{ template "seleniumGrid.chromeNode.fullname" (list $nodeConfig $) }} |
| 31 | + app.kubernetes.io/instance: {{ $.Release.Name }} |
| 32 | +{{- $podScope := deepCopy $ -}} |
| 33 | +{{- $_ := set $podScope "name" (include "seleniumGrid.chromeNode.fullname" (list $nodeConfig $)) -}} |
| 34 | +{{- $_ = set $podScope "node" $nodeConfig -}} |
| 35 | +{{- $_ = set $podScope "recorder" (mergeOverwrite $.Values.videoRecorder $nodeConfig.videoRecorder) -}} |
| 36 | +{{- $_ = set $podScope "uploader" (get $.Values.videoRecorder ($podScope.recorder.uploader.name | toString)) -}} |
35 | 37 | {{- include "seleniumGrid.podTemplate" $podScope | nindent 2 }}
|
| 38 | +--- |
| 39 | +{{- end }} |
36 | 40 | {{- end }}
|
0 commit comments