diff --git a/stable/selenium/Chart.yaml b/stable/selenium/Chart.yaml index 85ce14be3f..ed591a5077 100644 --- a/stable/selenium/Chart.yaml +++ b/stable/selenium/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: selenium -version: 1.0.12 +version: 1.1.0 appVersion: 3.141.59 description: Chart for selenium grid keywords: diff --git a/stable/selenium/README.md b/stable/selenium/README.md index 8c9e902ae7..800088b6ac 100644 --- a/stable/selenium/README.md +++ b/stable/selenium/README.md @@ -85,11 +85,12 @@ The following table lists the configurable parameters of the Selenium chart and | `hub.livenessTimeout` | Timeout for hub liveness probe in seconds | `1` | | `hub.probePath` | Path for readiness and liveness probes to check | `/wd/hub/status` | | `chrome.enabled` | Schedule a chrome node pod | `false` | +| `chrome.runAsDaemonSet` | Schedule chrome node pods as DaemonSet | `false` | | `chrome.image` | The selenium node chrome image | `selenium/node-chrome` | | `chrome.tag` | The selenium node chrome tag | `3.141.59` | | `chrome.imagePullSecrets` | The secret to use for pulling the image. Will override the global parameter if set | `nil` | | `chrome.pullPolicy` | The pull policy for the node chrome image | `IfNotPresent` | -| `chrome.replicas` | The number of selenium node chrome pods | `1` | +| `chrome.replicas` | The number of selenium node chrome pods. This is ignored if runAsDaemonSet is enabled. | `1` | | `chrome.podAnnotations` | Annotations on the chrome pods | `{}` | | `chrome.securityContext` | SecurityContext on the chrome pods | `{"runAsUser": 1000, "fsGroup": 1000}` | | `chrome.extraEnvs` | Any additional environment variables to set in the pods | `[]` | @@ -112,11 +113,12 @@ The following table lists the configurable parameters of the Selenium chart and | `chrome.affinity` | Deployemnt affinities to use for scheduling of the chrome if set this takes precedence over the global value | `nil` | | `chrome.tolerations` | Deployment tolerations to use for scheduling of the chrome if set this takes precedence over the global value | `nil` | | `chromeDebug.enabled` | Schedule a selenium node chrome debug pod | `false` | +| `chromeDebug.runAsDaemonSet` | Schedule selenium node chrome debug pods as DaemonSet | `false` | | `chromeDebug.image` | The selenium node chrome debug image | `selenium/node-chrome-debug` | | `chromeDebug.tag` | The selenium node chrome debug tag | `3.141.59` | | `chromeDebug.imagePullSecrets` | The secret to use for pulling the image. Will override the global parameter if set | `nil` | | `chromeDebug.pullPolicy` | The selenium node chrome debug pull policy | `IfNotPresent` | -| `chromeDebug.replicas` | The number of selenium node chrome debug pods | `1` | +| `chromeDebug.replicas` | The number of selenium node chrome debug pods. This is ignored if runAsDaemonSet is enabled. | `1` | | `chromeDebug.podAnnotations` | Annotations on the Chrome debug pod | `{}` | | `chromeDebug.securityContext` | SecurityContext on the Chrome debug pods | `{"runAsUser": 1000, "fsGroup": 1000}` | | `chromeDebug.extraEnvs` | Any additional environment variables to set in the pods | `[]` | @@ -139,11 +141,12 @@ The following table lists the configurable parameters of the Selenium chart and | `chromeDebug.affinity` | Deployemnt affinities to use for scheduling of the chromeDebug if set this takes precedence over the global value | `nil` | | `chromeDebug.tolerations` | Deployment tolerations to use for scheduling of the chromeDebug if set this takes precedence over the global value | `nil` | | `firefox.enabled` | Schedule a selenium node firefox pod | `false` | +| `firefox.runAsDaemonSet` | Schedule selenium node firefox pods as DaemonSet | `false` | | `firefox.image` | The selenium node firefox image | `selenium/node-firefox` | | `firefox.tag` | The selenium node firefox tag | `3.141.59` | | `firefox.imagePullSecrets` | The secret to use for pulling the image. Will override the global parameter if set | `nil` | | `firefox.pullPolicy` | The selenium node firefox pull policy | `IfNotPresent` | -| `firefox.replicas` | The number of selenium node firefox pods | `1` | +| `firefox.replicas` | The number of selenium node firefox pods. This is ignored if runAsDaemonSet is enabled. | `1` | | `firefox.podAnnotations` | Annotations on the firefox pods | `{}` | | `firefox.securityContext` | SecurityContext on the firefox pods | `{"runAsUser": 1000, "fsGroup": 1000}` | | `firefox.extraEnvs` | Any additional environment variables to set in the pods | `[]` | @@ -164,11 +167,12 @@ The following table lists the configurable parameters of the Selenium chart and | `firefox.affinity` | Deployemnt affinities to use for scheduling of the firefox if set this takes precedence over the global value | `nil` | | `firefox.tolerations` | Deployment tolerations to use for scheduling of the firefox if set this takes precedence over the global value | `nil` | | `firefoxDebug.enabled` | Schedule a selenium node firefox debug pod | `false` | +| `firefoxDebug.runAsDaemonSet` | Schedule selenium node firefox debug pods as DaemonSet | `false` | | `firefoxDebug.image` | The selenium node firefox debug image | `selenium/node-firefox-debug` | | `firefoxDebug.tag` | The selenium node firefox debug tag | `3.141.59` | | `firefoxDebug.imagePullSecrets` | The secret to use for pulling the image. Will override the global parameter if set | `nil` | | `firefoxDebug.pullPolicy` | The selenium node firefox debug pull policy | `IfNotPresent` | -| `firefoxDebug.replicas` | The number of selenium node firefox debug pods | `1` | +| `firefoxDebug.replicas` | The number of selenium node firefox debug pods. This is ignored if runAsDaemonSet is enabled. | `1` | | `firefoxDebug.podAnnotations` | Annotations on the firefox debug pods | `{}` | | `firefoxDebug.securityContext` | SecurityContext on the firefox debug pods | `{"runAsUser": 1000, "fsGroup": 1000}` | | `firefoxDebug.extraEnvs` | Any additional environment variables to set in the pods | `[]` | diff --git a/stable/selenium/templates/chrome-daemonset.yaml b/stable/selenium/templates/chrome-daemonset.yaml new file mode 100644 index 0000000000..572e7fe8fa --- /dev/null +++ b/stable/selenium/templates/chrome-daemonset.yaml @@ -0,0 +1,121 @@ +{{- if and (eq true .Values.chrome.enabled) (eq true .Values.chrome.runAsDaemonSet) -}} +apiVersion: {{ template "deployment.apiVersion" . }} +kind: DaemonSet +metadata: + name: {{ template "selenium.chrome.fullname" . }} + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" +spec: + selector: + matchLabels: + app: {{ template "selenium.chrome.fullname" . }} + release: "{{ .Release.Name }}" + template: + metadata: + labels: + app: {{ template "selenium.chrome.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + {{- if .Values.chrome.podAnnotations }} + annotations: +{{ toYaml .Values.chrome.podAnnotations | indent 8 }} + {{- end}} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.chrome.image }}:{{ .Values.chrome.tag }}" + imagePullPolicy: {{ .Values.chrome.pullPolicy }} + ports: + {{- if .Values.hub.jmxPort }} + - containerPort: {{ .Values.hub.jmxPort }} + name: jmx + protocol: TCP + {{- end }} + env: + - name: HUB_PORT_4444_TCP_ADDR + value: {{ template "selenium.hub.fullname" . }} + - name: HUB_PORT_4444_TCP_PORT + value: {{ .Values.hub.servicePort | quote }} + - name: JAVA_TOOL_OPTIONS + value: {{ default "" .Values.chrome.javaOpts | quote }} + - name: SE_OPTS + value: {{ default "" .Values.chrome.seOpts | quote }} + {{- if .Values.chrome.chromeVersion }} + - name: CHROME_VERSION + value: {{ .Values.chrome.chromeVersion | quote }} + {{- end }} + {{- if .Values.chrome.nodeMaxInstances }} + - name: NODE_MAX_INSTANCES + value: {{ .Values.chrome.nodeMaxInstances | quote }} + {{- end }} + {{- if .Values.chrome.nodeMaxSession }} + - name: NODE_MAX_SESSION + value: {{ .Values.chrome.nodeMaxSession | quote }} + {{- end }} + {{- if .Values.chrome.nodeRegisterCycle }} + - name: NODE_REGISTER_CYCLE + value: {{ .Values.chrome.nodeRegisterCycle | quote }} + {{- end }} + {{- if .Values.chrome.nodePort }} + - name: NODE_PORT + value: {{ .Values.chrome.nodePort | quote }} + {{- end }} + {{- if .Values.chrome.screenWidth }} + - name: SCREEN_WIDTH + value: {{ .Values.chrome.screenWidth | quote }} + {{- end }} + {{- if .Values.chrome.screenHeight }} + - name: SCREEN_HEIGHT + value: {{ .Values.chrome.screenHeight | quote }} + {{- end }} + {{- if .Values.chrome.screenDepth }} + - name: SCREEN_DEPTH + value: {{ .Values.chrome.screenDepth | quote }} + {{- end }} + {{- if .Values.chrome.display }} + - name: DISPLAY + value: {{ .Values.chrome.display | quote }} + {{- end }} + {{- if .Values.chrome.timeZone }} + - name: TZ + value: {{ .Values.chrome.timeZone | quote }} + {{- end }} + {{- if .Values.chrome.extraEnvs }} +{{ toYaml .Values.chrome.extraEnvs | indent 12 }} + {{- end }} + volumeMounts: +{{ if .Values.chrome.volumeMounts -}} +{{ toYaml .Values.chrome.volumeMounts | trim | indent 12 }} +{{- end }} + resources: +{{ toYaml .Values.chrome.resources | trim | indent 12 }} +{{- if or .Values.global.imagePullSecrets .Values.chrome.imagePullSecrets }} + imagePullSecrets: + - name: {{ .Values.chrome.imagePullSecrets | default .Values.global.imagePullSecrets | quote }} +{{- end }} + volumes: +{{ if .Values.chrome.volumes -}} +{{ toYaml .Values.chrome.volumes | trim | indent 8 }} +{{- end }} + hostAliases: +{{ toYaml .Values.global.hostAliases | trim | indent 8 }} + nodeSelector: +{{- if .Values.chrome.nodeSelector }} +{{ toYaml .Values.chrome.nodeSelector | trim | indent 8 }} +{{- else if .Values.global.nodeSelector }} +{{ toYaml .Values.global.nodeSelector | trim | indent 8 }} +{{- end }} + affinity: +{{- if .Values.chrome.affinity }} +{{ toYaml .Values.chrome.affinity | indent 8 }} +{{- else if .Values.global.affinity }} +{{ toYaml .Values.global.affinity | indent 8 }} +{{- end }} + tolerations: +{{- if .Values.chrome.tolerations }} +{{ toYaml .Values.chrome.tolerations | indent 8 }} +{{- else if .Values.global.tolerations }} +{{ toYaml .Values.global.tolerations | indent 8 }} +{{- end }} +{{- end -}} diff --git a/stable/selenium/templates/chrome-deployment.yaml b/stable/selenium/templates/chrome-deployment.yaml index 1339b53424..ef1075abbd 100644 --- a/stable/selenium/templates/chrome-deployment.yaml +++ b/stable/selenium/templates/chrome-deployment.yaml @@ -1,4 +1,4 @@ -{{- if eq true .Values.chrome.enabled -}} +{{- if and (eq true .Values.chrome.enabled) (eq false .Values.chrome.runAsDaemonSet) -}} apiVersion: {{ template "deployment.apiVersion" . }} kind: Deployment metadata: diff --git a/stable/selenium/templates/chromeDebug-daemonset.yaml b/stable/selenium/templates/chromeDebug-daemonset.yaml new file mode 100644 index 0000000000..238f214077 --- /dev/null +++ b/stable/selenium/templates/chromeDebug-daemonset.yaml @@ -0,0 +1,123 @@ +{{- if and (eq true .Values.chromeDebug.enabled) (eq true .Values.chromeDebug.runAsDaemonSet) -}} +apiVersion: {{ template "deployment.apiVersion" . }} +kind: DaemonSet +metadata: + name: {{ template "selenium.chromeDebug.fullname" . }} + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" +spec: + selector: + matchLabels: + app: {{ template "selenium.chromeDebug.fullname" . }} + release: "{{ .Release.Name }}" + template: + metadata: + labels: + app: {{ template "selenium.chromeDebug.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + {{- if .Values.chromeDebug.podAnnotations }} + annotations: +{{ toYaml .Values.chromeDebug.podAnnotations | indent 8 }} + {{- end}} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.chromeDebug.image }}:{{ .Values.chromeDebug.tag }}" + imagePullPolicy: {{ .Values.chromeDebug.pullPolicy }} + ports: + {{- if .Values.hub.jmxPort }} + - containerPort: {{ .Values.hub.jmxPort }} + name: jmx + protocol: TCP + {{- end }} + - containerPort: 5900 + name: vnc + env: + - name: HUB_PORT_4444_TCP_ADDR + value: {{ template "selenium.hub.fullname" . }} + - name: HUB_PORT_4444_TCP_PORT + value: {{ .Values.hub.servicePort | quote }} + - name: JAVA_TOOL_OPTIONS + value: {{ default "" .Values.chromeDebug.javaOpts | quote }} + - name: SE_OPTS + value: {{ default "" .Values.chromeDebug.seOpts | quote }} + {{- if .Values.chromeDebug.chromeVersion }} + - name: CHROME_VERSION + value: {{ .Values.chromeDebug.chromeVersion | quote }} + {{- end }} + {{- if .Values.chromeDebug.nodeMaxInstances }} + - name: NODE_MAX_INSTANCES + value: {{ .Values.chromeDebug.nodeMaxInstances | quote }} + {{- end }} + {{- if .Values.chromeDebug.nodeMaxSession }} + - name: NODE_MAX_SESSION + value: {{ .Values.chromeDebug.nodeMaxSession | quote }} + {{- end }} + {{- if .Values.chromeDebug.nodeRegisterCycle }} + - name: NODE_REGISTER_CYCLE + value: {{ .Values.chromeDebug.nodeRegisterCycle | quote }} + {{- end }} + {{- if .Values.chromeDebug.nodePort }} + - name: NODE_PORT + value: {{ .Values.chromeDebug.nodePort | quote }} + {{- end }} + {{- if .Values.chromeDebug.screenWidth }} + - name: SCREEN_WIDTH + value: {{ .Values.chromeDebug.screenWidth | quote }} + {{- end }} + {{- if .Values.chromeDebug.screenHeight }} + - name: SCREEN_HEIGHT + value: {{ .Values.chromeDebug.screenHeight | quote }} + {{- end }} + {{- if .Values.chromeDebug.screenDepth }} + - name: SCREEN_DEPTH + value: {{ .Values.chromeDebug.screenDepth | quote }} + {{- end }} + {{- if .Values.chromeDebug.display }} + - name: DISPLAY + value: {{ .Values.chromeDebug.display | quote }} + {{- end }} + {{- if .Values.chromeDebug.timeZone }} + - name: TZ + value: {{ .Values.chromeDebug.timeZone | quote }} + {{- end }} + {{- if .Values.chromeDebug.extraEnvs }} +{{ toYaml .Values.chromeDebug.extraEnvs | indent 12 }} + {{- end }} + volumeMounts: +{{ if .Values.chromeDebug.volumeMounts -}} +{{ toYaml .Values.chromeDebug.volumeMounts | indent 12 }} +{{- end }} + resources: +{{ toYaml .Values.chromeDebug.resources | indent 12 }} +{{- if or .Values.global.imagePullSecrets .Values.chromeDebug.imagePullSecrets }} + imagePullSecrets: + - name: {{ .Values.chromeDebug.imagePullSecrets | default .Values.global.imagePullSecrets | quote }} +{{- end }} + volumes: +{{ if .Values.chromeDebug.volumes -}} +{{ toYaml .Values.chromeDebug.volumes | indent 8 }} +{{- end }} + hostAliases: +{{ toYaml .Values.global.hostAliases | indent 8 }} + nodeSelector: +{{- if .Values.chromeDebug.nodeSelector }} +{{ toYaml .Values.chromeDebug.nodeSelector | indent 8 }} +{{- else if .Values.global.nodeSelector }} +{{ toYaml .Values.global.nodeSelector | indent 8 }} +{{- end }} + affinity: +{{- if .Values.chromeDebug.affinity }} +{{ toYaml .Values.chromeDebug.affinity | indent 8 }} +{{- else if .Values.global.affinity }} +{{ toYaml .Values.global.affinity | indent 8 }} +{{- end }} + tolerations: +{{- if .Values.chromeDebug.tolerations }} +{{ toYaml .Values.chromeDebug.tolerations | indent 8 }} +{{- else if .Values.global.tolerations }} +{{ toYaml .Values.global.tolerations | indent 8 }} +{{- end }} +{{- end -}} diff --git a/stable/selenium/templates/chromeDebug-deployment.yaml b/stable/selenium/templates/chromeDebug-deployment.yaml index afc94e462e..3c461e4075 100644 --- a/stable/selenium/templates/chromeDebug-deployment.yaml +++ b/stable/selenium/templates/chromeDebug-deployment.yaml @@ -1,4 +1,4 @@ -{{- if eq true .Values.chromeDebug.enabled -}} +{{- if and (eq true .Values.chromeDebug.enabled) (eq false .Values.chromeDebug.runAsDaemonSet) -}} apiVersion: {{ template "deployment.apiVersion" . }} kind: Deployment metadata: diff --git a/stable/selenium/templates/firefox-daemonset.yaml b/stable/selenium/templates/firefox-daemonset.yaml new file mode 100644 index 0000000000..51e0fdc4cf --- /dev/null +++ b/stable/selenium/templates/firefox-daemonset.yaml @@ -0,0 +1,113 @@ +{{- if and (eq true .Values.firefox.enabled) (eq true .Values.firefox.runAsDaemonSet) -}} +apiVersion: {{ template "deployment.apiVersion" . }} +kind: DaemonSet +metadata: + name: {{ template "selenium.firefox.fullname" . }} + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" +spec: + selector: + matchLabels: + app: {{ template "selenium.firefox.fullname" . }} + release: "{{ .Release.Name }}" + template: + metadata: + labels: + app: {{ template "selenium.firefox.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + {{- if .Values.firefox.podAnnotations }} + annotations: +{{ toYaml .Values.firefox.podAnnotations | indent 8 }} + {{- end}} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.firefox.image }}:{{ .Values.firefox.tag }}" + imagePullPolicy: {{ .Values.firefox.pullPolicy }} + ports: + {{- if .Values.hub.jmxPort }} + - containerPort: {{ .Values.hub.jmxPort }} + name: jmx + protocol: TCP + {{- end }} + env: + - name: HUB_PORT_4444_TCP_ADDR + value: {{ template "selenium.hub.fullname" . }} + - name: HUB_PORT_4444_TCP_PORT + value: {{ .Values.hub.servicePort | quote }} + - name: JAVA_TOOL_OPTIONS + value: {{ default "" .Values.firefox.javaOpts | quote }} + - name: SE_OPTS + value: {{ default "" .Values.firefox.seOpts | quote }} + {{- if .Values.firefox.firefoxVersion }} + - name: FIREFOX_VERSION + value: {{ .Values.firefox.firefoxVersion | quote }} + {{- end }} + {{- if .Values.firefox.nodeMaxInstances }} + - name: NODE_MAX_INSTANCES + value: {{ .Values.firefox.nodeMaxInstances | quote }} + {{- end }} + {{- if .Values.firefox.nodeMaxSession }} + - name: NODE_MAX_SESSION + value: {{ .Values.firefox.nodeMaxSession | quote }} + {{- end }} + {{- if .Values.firefox.nodeRegisterCycle }} + - name: NODE_REGISTER_CYCLE + value: {{ .Values.firefox.nodeRegisterCycle | quote }} + {{- end }} + {{- if .Values.firefox.nodePort }} + - name: NODE_PORT + value: {{ .Values.firefox.nodePort | quote }} + {{- end }} + {{- if .Values.firefox.screenWidth }} + - name: SCREEN_WIDTH + value: {{ .Values.firefox.screenWidth | quote }} + {{- end }} + {{- if .Values.firefox.screenHeight }} + - name: SCREEN_HEIGHT + value: {{ .Values.firefox.screenHeight | quote }} + {{- end }} + {{- if .Values.firefox.screenDepth }} + - name: SCREEN_DEPTH + value: {{ .Values.firefox.screenDepth | quote }} + {{- end }} + {{- if .Values.firefox.display }} + - name: DISPLAY + value: {{ .Values.firefox.display | quote }} + {{- end }} + {{- if .Values.firefox.timeZone }} + - name: TZ + value: {{ .Values.firefox.timeZone | quote }} + {{- end }} + {{- if .Values.firefox.extraEnvs }} +{{ toYaml .Values.firefox.extraEnvs | indent 12 }} + {{- end }} + resources: +{{ toYaml .Values.firefox.resources | indent 12 }} +{{- if or .Values.global.imagePullSecrets .Values.firefox.imagePullSecrets }} + imagePullSecrets: + - name: {{ .Values.firefox.imagePullSecrets | default .Values.global.imagePullSecrets | quote }} +{{- end }} + hostAliases: +{{ toYaml .Values.global.hostAliases | indent 8 }} + nodeSelector: +{{- if .Values.firefox.nodeSelector }} +{{ toYaml .Values.firefox.nodeSelector | trim | indent 8 }} +{{- else if .Values.global.nodeSelector }} +{{ toYaml .Values.global.nodeSelector | trim | indent 8 }} +{{- end }} + affinity: +{{- if .Values.firefox.affinity }} +{{ toYaml .Values.firefox.affinity | trim | indent 8 }} +{{- else if .Values.global.affinity }} +{{ toYaml .Values.global.affinity | trim | indent 8 }} +{{- end }} + tolerations: +{{- if .Values.firefox.tolerations }} +{{ toYaml .Values.firefox.tolerations | trim | indent 8 }} +{{- else if .Values.global.tolerations }} +{{ toYaml .Values.global.tolerations | trim | indent 8 }} +{{- end }} +{{- end -}} diff --git a/stable/selenium/templates/firefox-deployment.yaml b/stable/selenium/templates/firefox-deployment.yaml index 7801d3fbef..fe2e105936 100644 --- a/stable/selenium/templates/firefox-deployment.yaml +++ b/stable/selenium/templates/firefox-deployment.yaml @@ -1,4 +1,4 @@ -{{- if eq true .Values.firefox.enabled -}} +{{- if and (eq true .Values.firefox.enabled) (eq false .Values.firefox.runAsDaemonSet) -}} apiVersion: {{ template "deployment.apiVersion" . }} kind: Deployment metadata: diff --git a/stable/selenium/templates/firefoxDebug-daemonset.yaml b/stable/selenium/templates/firefoxDebug-daemonset.yaml new file mode 100644 index 0000000000..80b9c97921 --- /dev/null +++ b/stable/selenium/templates/firefoxDebug-daemonset.yaml @@ -0,0 +1,116 @@ +{{- if eq true .Values.firefoxDebug.enabled -}} +apiVersion: {{ template "deployment.apiVersion" . }} +kind: Deployment +metadata: + name: {{ template "selenium.firefoxDebug.fullname" . }} + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" +spec: + replicas: {{ .Values.firefoxDebug.replicas }} + selector: + matchLabels: + app: {{ template "selenium.firefoxDebug.fullname" . }} + release: "{{ .Release.Name }}" + template: + metadata: + labels: + app: {{ template "selenium.firefoxDebug.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + {{- if .Values.firefoxDebug.podAnnotations }} + annotations: +{{ toYaml .Values.firefoxDebug.podAnnotations | indent 8 }} + {{- end}} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.firefoxDebug.image }}:{{ .Values.firefoxDebug.tag }}" + imagePullPolicy: {{ .Values.firefoxDebug.pullPolicy }} + ports: + {{- if .Values.firefoxDebug.jmxPort }} + - containerPort: {{ .Values.firefoxDebug.jmxPort }} + name: jmx + protocol: TCP + {{- end }} + - containerPort: 5900 + name: vnc + env: + - name: HUB_PORT_4444_TCP_ADDR + value: {{ template "selenium.hub.fullname" . }} + - name: HUB_PORT_4444_TCP_PORT + value: {{ .Values.hub.servicePort | quote }} + - name: JAVA_TOOL_OPTIONS + value: {{ default "" .Values.firefoxDebug.javaOpts | quote }} + - name: SE_OPTS + value: {{ default "" .Values.firefoxDebug.seOpts | quote }} + {{- if .Values.firefoxDebug.firefoxVersion }} + - name: FIREFOX_VERSION + value: {{ .Values.firefoxDebug.firefoxVersion | quote }} + {{- end }} + {{- if .Values.firefoxDebug.nodeMaxInstances }} + - name: NODE_MAX_INSTANCES + value: {{ .Values.firefoxDebug.nodeMaxInstances | quote }} + {{- end }} + {{- if .Values.firefoxDebug.nodeMaxSession }} + - name: NODE_MAX_SESSION + value: {{ .Values.firefoxDebug.nodeMaxSession | quote }} + {{- end }} + {{- if .Values.firefoxDebug.nodeRegisterCycle }} + - name: NODE_REGISTER_CYCLE + value: {{ .Values.firefoxDebug.nodeRegisterCycle | quote }} + {{- end }} + {{- if .Values.firefoxDebug.nodePort }} + - name: NODE_PORT + value: {{ .Values.firefoxDebug.nodePort | quote }} + {{- end }} + {{- if .Values.firefoxDebug.screenWidth }} + - name: SCREEN_WIDTH + value: {{ .Values.firefoxDebug.screenWidth | quote }} + {{- end }} + {{- if .Values.firefoxDebug.screenHeight }} + - name: SCREEN_HEIGHT + value: {{ .Values.firefoxDebug.screenHeight | quote }} + {{- end }} + {{- if .Values.firefoxDebug.screenDepth }} + - name: SCREEN_DEPTH + value: {{ .Values.firefoxDebug.screenDepth | quote }} + {{- end }} + {{- if .Values.firefoxDebug.display }} + - name: DISPLAY + value: {{ .Values.firefoxDebug.display | quote }} + {{- end }} + {{- if .Values.firefoxDebug.timeZone }} + - name: TZ + value: {{ .Values.firefoxDebug.timeZone | quote }} + {{- end }} + {{- if .Values.firefoxDebug.extraEnvs }} +{{ toYaml .Values.firefoxDebug.extraEnvs | indent 12 }} + {{- end }} + resources: +{{ toYaml .Values.firefoxDebug.resources | indent 12 }} +{{- if or .Values.global.imagePullSecrets .Values.firefoxDebug.imagePullSecrets }} + imagePullSecrets: + - name: {{ .Values.firefoxDebug.imagePullSecrets | default .Values.global.imagePullSecrets | quote }} +{{- end }} + hostAliases: +{{ toYaml .Values.global.hostAliases | indent 8 }} + nodeSelector: +{{- if .Values.firefoxDebug.nodeSelector }} +{{ toYaml .Values.firefoxDebug.nodeSelector | indent 8 }} +{{- else if .Values.global.nodeSelector }} +{{ toYaml .Values.global.nodeSelector | indent 8 }} +{{- end }} + affinity: +{{- if .Values.firefoxDebug.affinity }} +{{ toYaml .Values.firefoxDebug.affinity | indent 8 }} +{{- else if .Values.global.affinity }} +{{ toYaml .Values.global.affinity | indent 8 }} +{{- end }} + tolerations: +{{- if .Values.firefoxDebug.tolerations }} +{{ toYaml .Values.firefoxDebug.tolerations | indent 8 }} +{{- else if .Values.global.tolerations }} +{{ toYaml .Values.global.tolerations | indent 8 }} +{{- end }} +{{- end -}} diff --git a/stable/selenium/templates/firefoxDebug-deployment.yaml b/stable/selenium/templates/firefoxDebug-deployment.yaml index 800bafa450..79854fb0f6 100644 --- a/stable/selenium/templates/firefoxDebug-deployment.yaml +++ b/stable/selenium/templates/firefoxDebug-deployment.yaml @@ -1,4 +1,4 @@ -{{- if eq true .Values.firefoxDebug.enabled -}} +{{- if and (eq true .Values.firefoxDebug.enabled) (eq false .Values.firefoxDebug.runAsDaemonSet) -}} apiVersion: {{ template "deployment.apiVersion" . }} kind: Deployment metadata: diff --git a/stable/selenium/values.yaml b/stable/selenium/values.yaml index 751c3dc0bc..f1921b6588 100644 --- a/stable/selenium/values.yaml +++ b/stable/selenium/values.yaml @@ -152,6 +152,9 @@ chrome: ## Enable the creation of a node-chrome pod enabled: false + ## DaemonSet instead of Deployment + runAsDaemonSet: false + ## The repository and image ## ref: https://hub.docker.com/r/selenium/node-chrome/ image: "selenium/node-chrome" @@ -167,7 +170,7 @@ chrome: ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images pullPolicy: "IfNotPresent" - ## The number of pods in the deployment + ## The number of pods in the deployment. This is ignored if runAsDaemonSet is enabled. replicas: 1 ## Configure annotations on the chrome pods @@ -248,6 +251,9 @@ chromeDebug: ## Enable the creation of a node-chrome-debug pod enabled: false + ## DaemonSet instead of Deployment + runAsDaemonSet: false + ## The repository and image ## ref: https://hub.docker.com/r/selenium/node-chrome-debug/ image: "selenium/node-chrome-debug" @@ -263,7 +269,7 @@ chromeDebug: ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images pullPolicy: "IfNotPresent" - ## The number of pods in the deployment + ## The number of pods in the deployment. This is ignored if runAsDaemonSet is enabled. replicas: 1 ## Configure annotations on the chrome debug pods @@ -343,6 +349,9 @@ firefox: ## Enable the creation of a node-firefox pod enabled: false + ## DaemonSet instead of Deployment + runAsDaemonSet: false + ## The repository and image ## ref: https://hub.docker.com/r/selenium/node-firefox/ image: "selenium/node-firefox" @@ -358,7 +367,7 @@ firefox: ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images pullPolicy: "IfNotPresent" - ## The number of pods in the deployment + ## The number of pods in the deployment. This is ignored if runAsDaemonSet is enabled. replicas: 1 ## Configure annotations on the firefox pods @@ -425,6 +434,9 @@ firefoxDebug: ## Enable the creation of a node-firefox-debug pod enabled: false + ## DaemonSet instead of Deployment + runAsDaemonSet: false + ## The repository and image ## ref: https://hub.docker.com/r/selenium/node-firefox-debug/ image: "selenium/node-firefox-debug" @@ -440,7 +452,7 @@ firefoxDebug: ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images pullPolicy: "IfNotPresent" - ## The number of pods in the deployment + ## The number of pods in the deployment. This is ignored if runAsDaemonSet is enabled. replicas: 1 ## Configure annotations on the firefox debug pods