[stable][selenium] Add the option of adding nodeSelectors (#3791)

* [stable][selenium] Add the option of adding nodeSelectors either globally or per component

* [stable][selenium] Change precendence of global NodeSelector values
This commit is contained in:
Gerald Barker
2018-04-07 07:24:08 -07:00
committed by k8s-ci-robot
parent b5d0b1281f
commit 55751ae201
8 changed files with 69 additions and 4 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: selenium
version: 0.2.9
version: 0.3.0
appVersion: 3.11.0
description: Chart for selenium grid
keywords:
+6
View File
@@ -42,6 +42,7 @@ The following table lists the configurable parameters of the Selenium chart and
| Parameter | Description | Default |
| --------- | ----------- | ------- |
| `global.nodeselector` | Node label to be useed globally for scheduling of all images | `nil` |
| `hub.image` | The selenium hub image | `selenium/hub` |
| `hub.tag` | The selenium hub image tag | `3.11.0` |
| `hub.pullPolicy` | The pull policy for the hub image | `IfNotPresent` |
@@ -60,6 +61,7 @@ The following table lists the configurable parameters of the Selenium chart and
| `hub.gridUnregisterIfStillDownAfer` | | `nil` |
| `hub.seOpts` | Command line arguments to pass to hub | `nil` |
| `hub.timeZone` | The time zone for the container | `nil` |
| `hub.nodeselector` | Node label to use for scheduling of the hub if set this takes precendence over the global value | `nil` |
| `chrome.enabled` | Schedule a chrome node pod | `false` |
| `chrome.image` | The selenium node chrome image | `selenium/node-chrome` |
| `chrome.tag` | The selenium node chrome tag | `3.11.0` |
@@ -80,6 +82,7 @@ The following table lists the configurable parameters of the Selenium chart and
| `chrome.nodePort` | The port to listen on | `nil` |
| `chrome.seOpts` | Command line arguments to pass to node | `nil` |
| `chrome.timeZone` | The time zone for the container | `nil` |
| `chrome.nodeselector` | Node label to use for scheduling of chrome images if set this takes precendence over the global value | `nil` |
| `chromeDebug.enabled` | Schedule a selenium node chrome debug pod | `false` |
| `chromeDebug.image` | The selenium node chrome debug image | `selenium/node-chrome-debug` |
| `chromeDebug.tag` | The selenium node chrome debug tag | `3.11.0` |
@@ -100,6 +103,7 @@ The following table lists the configurable parameters of the Selenium chart and
| `chromeDebug.nodePort` | The port to listen on | `nil` |
| `chromeDebug.seOpts` | Command line arguments to pass to node | `nil` |
| `chromeDebug.timeZone` | The time zone for the container | `nil` |
| `chromeDebug.nodeselector` | Node label to use for scheduling of chromeDebug images if set this takes precendence over the global value | `nil` |
| `firefox.enabled` | Schedule a selenium node firefox pod | `false` |
| `firefox.image` | The selenium node firefox image | `selenium/node-firefox` |
| `firefox.tag` | The selenium node firefox tag | `3.11.0` |
@@ -118,6 +122,7 @@ The following table lists the configurable parameters of the Selenium chart and
| `firefox.nodePort` | The port to listen on | `nil` |
| `firefox.seOpts` | Command line arguments to pass to node | `nil` |
| `firefox.timeZone` | The time zone for the container | `nil` |
| `firefox.nodeselector` | Node label to use for scheduling of firefox images if set this takes precendence over the global value | `nil` |
| `firefoxDebug.enabled` | Schedule a selenium node firefox debug pod | `false` |
| `firefoxDebug.image` | The selenium node firefox debug image | `selenium/node-firefox-debug` |
| `firefoxDebug.tag` | The selenium node firefox debug tag | `3.11.0` |
@@ -136,6 +141,7 @@ The following table lists the configurable parameters of the Selenium chart and
| `firefoxDebug.nodePort` | The port to listen on | `nil` |
| `firefoxDebug.seOpts` | Command line arguments to pass to node | `nil` |
| `firefoxDebug.timeZone` | The time zone for the container | `nil` |
| `firefoxDebug.nodeselector` | Node label to use for scheduling of firefoxDebug images if set this takes precendence over the global value | `nil` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
@@ -84,5 +84,11 @@ spec:
volumes:
{{ if .Values.chrome.volumes -}}
{{ toYaml .Values.chrome.volumes | indent 8 }}
{{- end }}
nodeSelector:
{{- if .Values.chrome.nodeSelector }}
{{ toYaml .Values.chrome.nodeSelector | indent 8 }}
{{- else if .Values.global.nodeSelector }}
{{ toYaml .Values.global.nodeSelector | indent 8 }}
{{- end -}}
{{- end -}}
{{- end -}}
@@ -86,5 +86,11 @@ spec:
volumes:
{{ if .Values.chromeDebug.volumes -}}
{{ toYaml .Values.chromeDebug.volumes | indent 8 }}
{{- end -}}
{{- end -}}
{{- end }}
nodeSelector:
{{- if .Values.chromeDebug.nodeSelector }}
{{ toYaml .Values.chromeDebug.nodeSelector | indent 8 }}
{{- else if .Values.global.nodeSelector }}
{{ toYaml .Values.global.nodeSelector | indent 8 }}
{{- end }}
{{- end -}}
@@ -77,4 +77,10 @@ spec:
{{- end }}
resources:
{{ toYaml .Values.firefox.resources | indent 12 }}
nodeSelector:
{{- if .Values.firefox.nodeSelector }}
{{ toYaml .Values.firefox.nodeSelector | indent 8 }}
{{- else if .Values.global.nodeSelector }}
{{ toYaml .Values.global.nodeSelector | indent 8 }}
{{- end }}
{{- end -}}
@@ -79,4 +79,10 @@ spec:
{{- end }}
resources:
{{ toYaml .Values.firefoxDebug.resources | indent 12 }}
nodeSelector:
{{- if .Values.firefoxDebug.nodeSelector }}
{{ toYaml .Values.firefoxDebug.nodeSelector | indent 8 }}
{{- else if .Values.global.nodeSelector }}
{{ toYaml .Values.global.nodeSelector | indent 8 }}
{{- end }}
{{- end -}}
@@ -81,3 +81,9 @@ spec:
{{- end }}
resources:
{{ toYaml .Values.hub.resources | indent 12 }}
nodeSelector:
{{- if .Values.hub.nodeSelector }}
{{ toYaml .Values.hub.nodeSelector | indent 8 }}
{{- else if .Values.global.nodeSelector }}
{{ toYaml .Values.global.nodeSelector | indent 8 }}
{{- end }}
+29
View File
@@ -1,3 +1,10 @@
global:
## NodeSelector to be used in every deployment
## hub, chrome, firefox, chromeDebug and firefoxDebug
## can also be spceifed at chart level see below
nodeSelector:
# label: value
hub:
## The repository and image
## ref: https://hub.docker.com/r/selenium/hub/
@@ -72,6 +79,11 @@ hub:
# gridUnregisterIfStillDownAfer: 30000
# timeZone: UTC
## NodeSelector to be used for the hub
nodeSelector:
# label: value
chrome:
## Enable the creation of a node-chrome pod
enabled: false
@@ -143,6 +155,11 @@ chrome:
# nodePort: 5555
# timeZone: UTC
## NodeSelector to be used for chrome
nodeSelector:
# label: value
chromeDebug:
## Enable the creation of a node-chrome-debug pod
enabled: false
@@ -214,6 +231,10 @@ chromeDebug:
# nodePort: 5555
# timeZone: UTC
## NodeSelector to be used for chromeDebug
nodeSelector:
# label: value
firefox:
## Enable the creation of a node-firefox pod
enabled: false
@@ -272,6 +293,10 @@ firefox:
# nodePort: 5555
# timeZone: UTC
## NodeSelector to be used for firefox
nodeSelector:
# label: value
firefoxDebug:
## Enable the creation of a node-firefox-debug pod
enabled: false
@@ -329,3 +354,7 @@ firefoxDebug:
# nodeRegisterCycle: 5000
# nodePort: 5555
# timeZone: UTC
## NodeSelector to be used for firefoxDebug
nodeSelector:
# label: value