Skip to content

Commit eb1bdae

Browse files
DrFaust92claude
andcommitted
chart(feature): add dnsPolicy and dnsConfig support
Expose pod dnsPolicy and dnsConfig across all Selenium Grid components (hub, router, distributor, event bus, session map, session queue, chrome/edge/firefox/relay nodes including KEDA ScaledJob pods, and the videoManager file-browser). Configurable globally via global.seleniumGrid.{dnsPolicy,dnsConfig} with per-component overrides, mirroring the existing affinity / topologySpreadConstraints pattern. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 6b39a64 commit eb1bdae

9 files changed

Lines changed: 104 additions & 0 deletions

charts/selenium-grid/templates/_helpers.tpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,13 @@ template:
723723
{{- $affinityYaml := default $.Values.global.seleniumGrid.affinity .node.affinity }}
724724
affinity: {{- toYaml $affinityYaml | nindent 6 }}
725725
{{- end }}
726+
{{- if or $.Values.global.seleniumGrid.dnsPolicy .node.dnsPolicy }}
727+
dnsPolicy: {{ default $.Values.global.seleniumGrid.dnsPolicy .node.dnsPolicy }}
728+
{{- end }}
729+
{{- if or $.Values.global.seleniumGrid.dnsConfig .node.dnsConfig }}
730+
{{- $dnsConfigYaml := default $.Values.global.seleniumGrid.dnsConfig .node.dnsConfig }}
731+
dnsConfig: {{- toYaml $dnsConfigYaml | nindent 6 }}
732+
{{- end }}
726733
{{- if or $.Values.global.seleniumGrid.topologySpreadConstraints .node.topologySpreadConstraints }}
727734
{{- $topologySpreadConstraints := default $.Values.global.seleniumGrid.topologySpreadConstraints .node.topologySpreadConstraints }}
728735
{{- $appName := .name }}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,13 @@ spec:
193193
{{- $affinityYaml := default .Values.global.seleniumGrid.affinity .Values.components.distributor.affinity }}
194194
affinity: {{- toYaml $affinityYaml | nindent 8 }}
195195
{{- end }}
196+
{{- if or .Values.global.seleniumGrid.dnsPolicy .Values.components.distributor.dnsPolicy }}
197+
dnsPolicy: {{ default .Values.global.seleniumGrid.dnsPolicy .Values.components.distributor.dnsPolicy }}
198+
{{- end }}
199+
{{- if or .Values.global.seleniumGrid.dnsConfig .Values.components.distributor.dnsConfig }}
200+
{{- $dnsConfigYaml := default .Values.global.seleniumGrid.dnsConfig .Values.components.distributor.dnsConfig }}
201+
dnsConfig: {{- toYaml $dnsConfigYaml | nindent 8 }}
202+
{{- end }}
196203
{{- if or .Values.global.seleniumGrid.topologySpreadConstraints .Values.components.distributor.topologySpreadConstraints }}
197204
{{- $topologySpreadConstraints := default .Values.global.seleniumGrid.topologySpreadConstraints .Values.components.distributor.topologySpreadConstraints }}
198205
topologySpreadConstraints:

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ spec:
100100
{{- $affinityYaml := default .Values.global.seleniumGrid.affinity .Values.components.eventBus.affinity }}
101101
affinity: {{- toYaml $affinityYaml | nindent 8 }}
102102
{{- end }}
103+
{{- if or .Values.global.seleniumGrid.dnsPolicy .Values.components.eventBus.dnsPolicy }}
104+
dnsPolicy: {{ default .Values.global.seleniumGrid.dnsPolicy .Values.components.eventBus.dnsPolicy }}
105+
{{- end }}
106+
{{- if or .Values.global.seleniumGrid.dnsConfig .Values.components.eventBus.dnsConfig }}
107+
{{- $dnsConfigYaml := default .Values.global.seleniumGrid.dnsConfig .Values.components.eventBus.dnsConfig }}
108+
dnsConfig: {{- toYaml $dnsConfigYaml | nindent 8 }}
109+
{{- end }}
103110
{{- if or .Values.global.seleniumGrid.topologySpreadConstraints .Values.components.eventBus.topologySpreadConstraints }}
104111
{{- $topologySpreadConstraints := default .Values.global.seleniumGrid.topologySpreadConstraints .Values.components.eventBus.topologySpreadConstraints }}
105112
topologySpreadConstraints:

charts/selenium-grid/templates/hub-deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,13 @@ spec:
190190
{{- $affinityYaml := default .Values.global.seleniumGrid.affinity .Values.hub.affinity }}
191191
affinity: {{- toYaml $affinityYaml | nindent 8 }}
192192
{{- end }}
193+
{{- if or .Values.global.seleniumGrid.dnsPolicy .Values.hub.dnsPolicy }}
194+
dnsPolicy: {{ default .Values.global.seleniumGrid.dnsPolicy .Values.hub.dnsPolicy }}
195+
{{- end }}
196+
{{- if or .Values.global.seleniumGrid.dnsConfig .Values.hub.dnsConfig }}
197+
{{- $dnsConfigYaml := default .Values.global.seleniumGrid.dnsConfig .Values.hub.dnsConfig }}
198+
dnsConfig: {{- toYaml $dnsConfigYaml | nindent 8 }}
199+
{{- end }}
193200
{{- if or .Values.global.seleniumGrid.topologySpreadConstraints .Values.hub.topologySpreadConstraints }}
194201
{{- $topologySpreadConstraints := default .Values.global.seleniumGrid.topologySpreadConstraints .Values.hub.topologySpreadConstraints }}
195202
topologySpreadConstraints:

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,13 @@ spec:
173173
{{- $affinityYaml := default .Values.global.seleniumGrid.affinity .Values.components.router.affinity }}
174174
affinity: {{- toYaml $affinityYaml | nindent 8 }}
175175
{{- end }}
176+
{{- if or .Values.global.seleniumGrid.dnsPolicy .Values.components.router.dnsPolicy }}
177+
dnsPolicy: {{ default .Values.global.seleniumGrid.dnsPolicy .Values.components.router.dnsPolicy }}
178+
{{- end }}
179+
{{- if or .Values.global.seleniumGrid.dnsConfig .Values.components.router.dnsConfig }}
180+
{{- $dnsConfigYaml := default .Values.global.seleniumGrid.dnsConfig .Values.components.router.dnsConfig }}
181+
dnsConfig: {{- toYaml $dnsConfigYaml | nindent 8 }}
182+
{{- end }}
176183
{{- if or .Values.global.seleniumGrid.topologySpreadConstraints .Values.components.router.topologySpreadConstraints }}
177184
{{- $topologySpreadConstraints := default .Values.global.seleniumGrid.topologySpreadConstraints .Values.components.router.topologySpreadConstraints }}
178185
topologySpreadConstraints:

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ spec:
101101
{{- $affinityYaml := default .Values.global.seleniumGrid.affinity .Values.components.sessionMap.affinity }}
102102
affinity: {{- toYaml $affinityYaml | nindent 8 }}
103103
{{- end }}
104+
{{- if or .Values.global.seleniumGrid.dnsPolicy .Values.components.sessionMap.dnsPolicy }}
105+
dnsPolicy: {{ default .Values.global.seleniumGrid.dnsPolicy .Values.components.sessionMap.dnsPolicy }}
106+
{{- end }}
107+
{{- if or .Values.global.seleniumGrid.dnsConfig .Values.components.sessionMap.dnsConfig }}
108+
{{- $dnsConfigYaml := default .Values.global.seleniumGrid.dnsConfig .Values.components.sessionMap.dnsConfig }}
109+
dnsConfig: {{- toYaml $dnsConfigYaml | nindent 8 }}
110+
{{- end }}
104111
{{- if or .Values.global.seleniumGrid.topologySpreadConstraints .Values.components.sessionMap.topologySpreadConstraints }}
105112
{{- $topologySpreadConstraints := default .Values.global.seleniumGrid.topologySpreadConstraints .Values.components.sessionMap.topologySpreadConstraints }}
106113
topologySpreadConstraints:

charts/selenium-grid/templates/session-queue-deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ spec:
9999
{{- $affinityYaml := default .Values.global.seleniumGrid.affinity .Values.components.sessionQueue.affinity }}
100100
affinity: {{- toYaml $affinityYaml | nindent 8 }}
101101
{{- end }}
102+
{{- if or .Values.global.seleniumGrid.dnsPolicy .Values.components.sessionQueue.dnsPolicy }}
103+
dnsPolicy: {{ default .Values.global.seleniumGrid.dnsPolicy .Values.components.sessionQueue.dnsPolicy }}
104+
{{- end }}
105+
{{- if or .Values.global.seleniumGrid.dnsConfig .Values.components.sessionQueue.dnsConfig }}
106+
{{- $dnsConfigYaml := default .Values.global.seleniumGrid.dnsConfig .Values.components.sessionQueue.dnsConfig }}
107+
dnsConfig: {{- toYaml $dnsConfigYaml | nindent 8 }}
108+
{{- end }}
102109
{{- if or .Values.global.seleniumGrid.topologySpreadConstraints .Values.components.sessionQueue.topologySpreadConstraints }}
103110
{{- $topologySpreadConstraints := default .Values.global.seleniumGrid.topologySpreadConstraints .Values.components.sessionQueue.topologySpreadConstraints }}
104111
topologySpreadConstraints:

charts/selenium-grid/templates/video-manager/file-browser-deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ spec:
8888
{{- $affinityYaml := default .Values.global.seleniumGrid.affinity .Values.videoManager.affinity }}
8989
affinity: {{- toYaml $affinityYaml | nindent 8 }}
9090
{{- end }}
91+
{{- if or .Values.global.seleniumGrid.dnsPolicy .Values.videoManager.dnsPolicy }}
92+
dnsPolicy: {{ default .Values.global.seleniumGrid.dnsPolicy .Values.videoManager.dnsPolicy }}
93+
{{- end }}
94+
{{- if or .Values.global.seleniumGrid.dnsConfig .Values.videoManager.dnsConfig }}
95+
{{- $dnsConfigYaml := default .Values.global.seleniumGrid.dnsConfig .Values.videoManager.dnsConfig }}
96+
dnsConfig: {{- toYaml $dnsConfigYaml | nindent 8 }}
97+
{{- end }}
9198
{{- if or .Values.global.seleniumGrid.topologySpreadConstraints .Values.videoManager.topologySpreadConstraints }}
9299
{{- $topologySpreadConstraints := default .Values.global.seleniumGrid.topologySpreadConstraints .Values.videoManager.topologySpreadConstraints }}
93100
topologySpreadConstraints:

charts/selenium-grid/values.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ global:
4646
maxUnavailable: 0
4747
# -- Specify affinity for all components, can be overridden individually
4848
affinity: {}
49+
# -- Specify dnsPolicy for all components, can be overridden individually
50+
dnsPolicy: ""
51+
# -- Specify dnsConfig for all components, can be overridden individually
52+
dnsConfig: {}
4953
# -- Specify topologySpreadConstraints for all components, can be overridden individually
5054
topologySpreadConstraints: []
5155
# - maxSkew: 4
@@ -474,6 +478,10 @@ components:
474478
affinity: {}
475479
# -- Specify topologySpreadConstraints for router pods, this overwrites global.seleniumGrid.topologySpreadConstraints parameter
476480
topologySpreadConstraints: []
481+
# -- Specify dnsPolicy for router pods, this overwrites global.seleniumGrid.dnsPolicy parameter
482+
dnsPolicy: ""
483+
# -- Specify dnsConfig for router pods, this overwrites global.seleniumGrid.dnsConfig parameter
484+
dnsConfig: {}
477485
# -- Custom annotations for router pods
478486
annotations: {}
479487
# -- Router container port
@@ -566,6 +574,10 @@ components:
566574
affinity: {}
567575
# -- Specify topologySpreadConstraints for Distributor pods, this overwrites global.seleniumGrid.topologySpreadConstraints parameter
568576
topologySpreadConstraints: []
577+
# -- Specify dnsPolicy for Distributor pods, this overwrites global.seleniumGrid.dnsPolicy parameter
578+
dnsPolicy: ""
579+
# -- Specify dnsConfig for Distributor pods, this overwrites global.seleniumGrid.dnsConfig parameter
580+
dnsConfig: {}
569581
# -- Custom annotations for Distributor pods
570582
annotations: {}
571583
# -- Distributor container port
@@ -648,6 +660,10 @@ components:
648660
affinity: {}
649661
# -- Specify topologySpreadConstraints for Event Bus pods, this overwrites global.seleniumGrid.topologySpreadConstraints parameter
650662
topologySpreadConstraints: []
663+
# -- Specify dnsPolicy for Event Bus pods, this overwrites global.seleniumGrid.dnsPolicy parameter
664+
dnsPolicy: ""
665+
# -- Specify dnsConfig for Event Bus pods, this overwrites global.seleniumGrid.dnsConfig parameter
666+
dnsConfig: {}
651667
# -- Custom annotations for Event Bus pods
652668
annotations: {}
653669
# -- Event Bus container port
@@ -717,6 +733,10 @@ components:
717733
affinity: {}
718734
# -- Specify topologySpreadConstraints for Session Map pods, this overwrites global.seleniumGrid.topologySpreadConstraints parameter
719735
topologySpreadConstraints: []
736+
# -- Specify dnsPolicy for Session Map pods, this overwrites global.seleniumGrid.dnsPolicy parameter
737+
dnsPolicy: ""
738+
# -- Specify dnsConfig for Session Map pods, this overwrites global.seleniumGrid.dnsConfig parameter
739+
dnsConfig: {}
720740
# -- Custom annotations for Session Map pods
721741
annotations: {}
722742
# -- Session Map container port
@@ -789,6 +809,10 @@ components:
789809
affinity: {}
790810
# -- Specify topologySpreadConstraints for Session Queue pods, this overwrites global.seleniumGrid.topologySpreadConstraints parameter
791811
topologySpreadConstraints: []
812+
# -- Specify dnsPolicy for Session Queue pods, this overwrites global.seleniumGrid.dnsPolicy parameter
813+
dnsPolicy: ""
814+
# -- Specify dnsConfig for Session Queue pods, this overwrites global.seleniumGrid.dnsConfig parameter
815+
dnsConfig: {}
792816
# -- Custom annotations for Session Queue pods
793817
annotations: {}
794818
# -- Session Queue container port
@@ -867,6 +891,10 @@ hub:
867891
affinity: {}
868892
# -- Specify topologySpreadConstraints for Hub pods, this overwrites global.seleniumGrid.topologySpreadConstraints parameter
869893
topologySpreadConstraints: []
894+
# -- Specify dnsPolicy for Hub pods, this overwrites global.seleniumGrid.dnsPolicy parameter
895+
dnsPolicy: ""
896+
# -- Specify dnsConfig for Hub pods, this overwrites global.seleniumGrid.dnsConfig parameter
897+
dnsConfig: {}
870898
# -- Custom annotations for Selenium Hub pods
871899
annotations: {}
872900
# -- Custom labels for Selenium Hub pods
@@ -1252,6 +1280,10 @@ chromeNode:
12521280
affinity: {}
12531281
# -- Specify topologySpreadConstraints for chrome-node pods, this overwrites global.seleniumGrid.topologySpreadConstraints parameter
12541282
topologySpreadConstraints: []
1283+
# -- Specify dnsPolicy for chrome-node pods, this overwrites global.seleniumGrid.dnsPolicy parameter
1284+
dnsPolicy: ""
1285+
# -- Specify dnsConfig for chrome-node pods, this overwrites global.seleniumGrid.dnsConfig parameter
1286+
dnsConfig: {}
12551287
# -- Annotations for chrome-node pods
12561288
annotations: {}
12571289
# -- Labels for chrome-node pods
@@ -1452,6 +1484,10 @@ firefoxNode:
14521484
affinity: {}
14531485
# -- Specify topologySpreadConstraints for firefox-node pods, this overwrites global.seleniumGrid.topologySpreadConstraints parameter
14541486
topologySpreadConstraints: []
1487+
# -- Specify dnsPolicy for firefox-node pods, this overwrites global.seleniumGrid.dnsPolicy parameter
1488+
dnsPolicy: ""
1489+
# -- Specify dnsConfig for firefox-node pods, this overwrites global.seleniumGrid.dnsConfig parameter
1490+
dnsConfig: {}
14551491
# -- Annotations for firefox-node pods
14561492
annotations: {}
14571493
# -- Labels for firefox-node pods
@@ -1652,6 +1688,10 @@ edgeNode:
16521688
affinity: {}
16531689
# -- Specify topologySpreadConstraints for edge-node pods, this overwrites global.seleniumGrid.topologySpreadConstraints parameter
16541690
topologySpreadConstraints: []
1691+
# -- Specify dnsPolicy for edge-node pods, this overwrites global.seleniumGrid.dnsPolicy parameter
1692+
dnsPolicy: ""
1693+
# -- Specify dnsConfig for edge-node pods, this overwrites global.seleniumGrid.dnsConfig parameter
1694+
dnsConfig: {}
16551695
# -- Annotations for edge-node pods
16561696
annotations: {}
16571697
# -- Labels for edge-node pods
@@ -1853,6 +1893,10 @@ relayNode:
18531893
affinity: {}
18541894
# -- Specify topologySpreadConstraints for relay-node pods, this overwrites global.seleniumGrid.topologySpreadConstraints parameter
18551895
topologySpreadConstraints: []
1896+
# -- Specify dnsPolicy for relay-node pods, this overwrites global.seleniumGrid.dnsPolicy parameter
1897+
dnsPolicy: ""
1898+
# -- Specify dnsConfig for relay-node pods, this overwrites global.seleniumGrid.dnsConfig parameter
1899+
dnsConfig: {}
18561900
# -- Annotations for relay-node pods
18571901
annotations: {}
18581902
# -- Labels for relay-node pods
@@ -2192,6 +2236,10 @@ videoManager:
21922236
affinity: {}
21932237
# -- Specify topologySpreadConstraints for router pods, this overwrites global.seleniumGrid.topologySpreadConstraints parameter
21942238
topologySpreadConstraints: []
2239+
# -- Specify dnsPolicy for file-browser pods, this overwrites global.seleniumGrid.dnsPolicy parameter
2240+
dnsPolicy: ""
2241+
# -- Specify dnsConfig for file-browser pods, this overwrites global.seleniumGrid.dnsConfig parameter
2242+
dnsConfig: {}
21952243
# -- Custom annotations for router pods
21962244
annotations: {}
21972245
# -- Router container port

0 commit comments

Comments
 (0)