<p>I am working on selenium grid helm chart and i am trying to understand where does the <code>.node.lifecycle</code> is coming from , I don't see it in values.yaml file. is this some how mapped to chrome/firefox/edge node ?</p>
<p><a href="https://github.com/SeleniumHQ/docker-selenium/blob/trunk/charts/selenium-grid/templates/_helpers.tpl#L201C63-L201C63" rel="nofollow noreferrer">https://github.com/SeleniumHQ/docker-selenium/blob/trunk/charts/selenium-grid/templates/_helpers.tpl#L201C63-L201C63</a></p>
<p><code>{{ $lifecycle := tpl (toYaml (default (dict) .node.lifecycle)) $ }}</code></p>
<p>Complete block:</p>
<pre><code>{{/*
Get the lifecycle of the pod. When KEDA is activated and the lifecycle is used for a pod of a
deployment preStop hook to deregister from the selenium hub.
*/}}
{{- define &quot;seleniumGrid.lifecycle&quot; }}
{{ $lifecycle := tpl (toYaml (default (dict) .node.lifecycle)) $ }}
{{- if and (eq .Values.autoscaling.scalingType &quot;deployment&quot;) (eq (include &quot;seleniumGrid.useKEDA&quot; .) &quot;true&quot;) -}}
{{ $lifecycle = merge ($lifecycle | fromYaml ) .Values.autoscaling.deregisterLifecycle | toYaml }}
{{- end -}}
{{ if and $lifecycle (ne $lifecycle &quot;{}&quot;) -}}
lifecycle: {{ $lifecycle | nindent 2 }}
{{- end -}}
{{- end -}}
</code></pre>

deepakguna
<p>Yes, the <code>.node</code> is the <code>chromeNode</code> etc. which coming from the <code>$podScope</code> which defined in each <code>scaledJob.yml</code>, for example in <code>firefox-node-scaledjob.yaml</code>:</p>
<pre><code>{{- $podScope := deepCopy . -}}
{{- $_ := set $podScope &quot;name&quot; &quot;selenium-firefox-node&quot; -}}
{{- $_ =  set $podScope &quot;node&quot; .Values.firefoxNode  -}}
{{- include &quot;seleniumGrid.podTemplate&quot; $podScope | nindent 4 }}
</code></pre>
<p>So when it's call to <code>seleniumGrid.podTemplate</code> it sending the <code>$podScope</code> to the <code>_helpers.tpl</code> and the variable <code>seleniumGrid.podTemplate</code> using it a lot (every time you see <code>.node</code>).</p>
