From ee67cf51ea446310558ed39fc6e95c70f8cd1936 Mon Sep 17 00:00:00 2001 From: Daniel Schaaff Date: Tue, 7 Jul 2020 02:12:00 -0700 Subject: [PATCH] [stable/selenium] Add ability to pass additional pod labels for all pods (#22931) * Add ability to pass additional pod labels for all pods My use case for these is to add a pod label to be used with and AWS EKS Fargate profile. By default no additional labels are added. Signed-off-by: Daniel Schaaff * Bump the chart version Signed-off-by: Daniel Schaaff --- stable/selenium/Chart.yaml | 2 +- stable/selenium/README.md | 5 +++++ stable/selenium/templates/chrome-daemonset.yaml | 3 +++ stable/selenium/templates/chrome-deployment.yaml | 3 +++ stable/selenium/templates/chromeDebug-daemonset.yaml | 3 +++ stable/selenium/templates/chromeDebug-deployment.yaml | 3 +++ stable/selenium/templates/firefox-daemonset.yaml | 3 +++ stable/selenium/templates/firefox-deployment.yaml | 3 +++ stable/selenium/templates/firefoxDebug-daemonset.yaml | 3 +++ stable/selenium/templates/firefoxDebug-deployment.yaml | 3 +++ stable/selenium/templates/hub-deployment.yaml | 3 +++ stable/selenium/values.yaml | 10 ++++++++++ 12 files changed, 43 insertions(+), 1 deletion(-) diff --git a/stable/selenium/Chart.yaml b/stable/selenium/Chart.yaml index 80ea08e4dff0..a73d092aacba 100644 --- a/stable/selenium/Chart.yaml +++ b/stable/selenium/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: selenium -version: 1.1.1 +version: 1.1.2 appVersion: 3.141.59 description: Chart for selenium grid keywords: diff --git a/stable/selenium/README.md b/stable/selenium/README.md index e6bdb6c5bfad..83ad065e403b 100644 --- a/stable/selenium/README.md +++ b/stable/selenium/README.md @@ -55,6 +55,7 @@ The following table lists the configurable parameters of the Selenium chart and | `hub.servicePort` | The port the hub Service listens on | `4444` | | `hub.nodePort` | The port the hub is exposed when Nodeport mode is selected | `nil` | | `hub.podAnnotations` | Annotations on the hub pod | `{}` | +| `hub.podLabels` | Additionals labels to the hub pod | `{}`| | `hub.securityContext` | SecurityContext on the hub pod | `{"runAsUser": 1000, "fsGroup": 1000}` | | `hub.extraEnvs` | Any additional environment variables to set in the pods | `[]` | | `hub.javaOpts` | The java options for the selenium hub JVM, default sets the maximum heap size to 400 mb | `-Xmx400m` | @@ -94,6 +95,7 @@ The following table lists the configurable parameters of the Selenium chart and | `chrome.enableLivenessProbe` | When true will add a liveness check to the pod | `false` | | `chrome.waitForRunningSessions` | When true will wait for current running sessions to finish before terminating the pod | `false` | | `chrome.podAnnotations` | Annotations on the chrome pods | `{}` | +| `chrome.podLabels` | Additional labels 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 | `[]` | | `chrome.javaOpts` | The java options for the selenium node chrome JVM, default sets the maximum heap size to 900 mb | `-Xmx900m` | @@ -124,6 +126,7 @@ The following table lists the configurable parameters of the Selenium chart and | `chromeDebug.enableLivenessProbe` | When true will add a liveness check to the pod | `false` | | `chromeDebug.waitForRunningSessions` | When true will wait for current running sessions to finish before terminating the pod | `false` | | `chromeDebug.podAnnotations` | Annotations on the Chrome debug pod | `{}` | +| `chromeDebug.podLabels` | Additional labels on the Chrome debug pods | `{}` | | `chromeDebug.securityContext` | SecurityContext on the Chrome debug pods | `{"runAsUser": 1000, "fsGroup": 1000}` | | `chromeDebug.extraEnvs` | Any additional environment variables to set in the pods | `[]` | | `chromeDebug.javaOpts` | The java options for a selenium node chrome debug JVM, default sets the max heap size to 900 mb | `-Xmx900m` | @@ -154,6 +157,7 @@ The following table lists the configurable parameters of the Selenium chart and | `firefox.enableLivenessProbe` | When true will add a liveness check to the pod | `false` | | `firefox.waitForRunningSessions` | When true will wait for current running sessions to finish before terminating the pod | `false` | | `firefox.podAnnotations` | Annotations on the firefox pods | `{}` | +| `firefox.podLabels` | Additional labels 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 | `[]` | | `firefox.javaOpts` | The java options for a selenium node firefox JVM, default sets the max heap size to 900 mb | `-Xmx900m` | @@ -182,6 +186,7 @@ The following table lists the configurable parameters of the Selenium chart and | `firefoxDebug.enableLivenessProbe` | When true will add a liveness check to the pod | `false` | | `firefoxDebug.waitForRunningSessions` | When true will wait for current running sessions to finish before terminating the pod | `false` | | `firefoxDebug.podAnnotations` | Annotations on the firefox debug pods | `{}` | +| `firefoxDebug.podLabels` | Additional labels 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 | `[]` | | `firefoxDebug.javaOpts` | The java options for a selenium node firefox debug JVM, default sets the max heap size to 900 mb | `-Xmx900m` | diff --git a/stable/selenium/templates/chrome-daemonset.yaml b/stable/selenium/templates/chrome-daemonset.yaml index c3a8083c18d3..6eaacb2562a6 100644 --- a/stable/selenium/templates/chrome-daemonset.yaml +++ b/stable/selenium/templates/chrome-daemonset.yaml @@ -17,6 +17,9 @@ spec: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" + {{- with .Values.chrome.podLabels }} + {{ toYaml .| indent 2 }} + {{- end }} {{- if .Values.chrome.podAnnotations }} annotations: {{ toYaml .Values.chrome.podAnnotations | indent 8 }} diff --git a/stable/selenium/templates/chrome-deployment.yaml b/stable/selenium/templates/chrome-deployment.yaml index 3dc1606661bd..94fa43332750 100644 --- a/stable/selenium/templates/chrome-deployment.yaml +++ b/stable/selenium/templates/chrome-deployment.yaml @@ -18,6 +18,9 @@ spec: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" + {{- with .Values.chrome.podLabels }} + {{ toYaml .| indent 2 }} + {{- end }} {{- if .Values.chrome.podAnnotations }} annotations: {{ toYaml .Values.chrome.podAnnotations | indent 8 }} diff --git a/stable/selenium/templates/chromeDebug-daemonset.yaml b/stable/selenium/templates/chromeDebug-daemonset.yaml index 2caa7d4ab89f..c0a4b85c1d81 100644 --- a/stable/selenium/templates/chromeDebug-daemonset.yaml +++ b/stable/selenium/templates/chromeDebug-daemonset.yaml @@ -17,6 +17,9 @@ spec: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" + {{- with .Values.chromeDebug.podLabels }} + {{ toYaml .| indent 2 }} + {{- end }} {{- if .Values.chromeDebug.podAnnotations }} annotations: {{ toYaml .Values.chromeDebug.podAnnotations | indent 8 }} diff --git a/stable/selenium/templates/chromeDebug-deployment.yaml b/stable/selenium/templates/chromeDebug-deployment.yaml index f83e64c437e6..2fa0ce62d213 100644 --- a/stable/selenium/templates/chromeDebug-deployment.yaml +++ b/stable/selenium/templates/chromeDebug-deployment.yaml @@ -18,6 +18,9 @@ spec: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" + {{- with .Values.chromeDebug.podLabels }} + {{ toYaml .| indent 2 }} + {{- end }} {{- if .Values.chromeDebug.podAnnotations }} annotations: {{ toYaml .Values.chromeDebug.podAnnotations | indent 8 }} diff --git a/stable/selenium/templates/firefox-daemonset.yaml b/stable/selenium/templates/firefox-daemonset.yaml index 5a457e0e0108..81477a605505 100644 --- a/stable/selenium/templates/firefox-daemonset.yaml +++ b/stable/selenium/templates/firefox-daemonset.yaml @@ -17,6 +17,9 @@ spec: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" + {{- with .Values.firefox.podLabels }} + {{ toYaml .| indent 2 }} + {{- end }} {{- if .Values.firefox.podAnnotations }} annotations: {{ toYaml .Values.firefox.podAnnotations | indent 8 }} diff --git a/stable/selenium/templates/firefox-deployment.yaml b/stable/selenium/templates/firefox-deployment.yaml index 05245a40ca6c..23d6ebec9f87 100644 --- a/stable/selenium/templates/firefox-deployment.yaml +++ b/stable/selenium/templates/firefox-deployment.yaml @@ -18,6 +18,9 @@ spec: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" + {{- with .Values.firefox.podLabels }} + {{ toYaml .| indent 2 }} + {{- end }} {{- if .Values.firefox.podAnnotations }} annotations: {{ toYaml .Values.firefox.podAnnotations | indent 8 }} diff --git a/stable/selenium/templates/firefoxDebug-daemonset.yaml b/stable/selenium/templates/firefoxDebug-daemonset.yaml index cb31f59106ba..64e0dc9a32b9 100644 --- a/stable/selenium/templates/firefoxDebug-daemonset.yaml +++ b/stable/selenium/templates/firefoxDebug-daemonset.yaml @@ -18,6 +18,9 @@ spec: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" + {{- with .Values.firefoxDebug.podLabels }} + {{ toYaml .| indent 2 }} + {{- end }} {{- if .Values.firefoxDebug.podAnnotations }} annotations: {{ toYaml .Values.firefoxDebug.podAnnotations | indent 8 }} diff --git a/stable/selenium/templates/firefoxDebug-deployment.yaml b/stable/selenium/templates/firefoxDebug-deployment.yaml index fd19fcf27c3b..c15f59a2d364 100644 --- a/stable/selenium/templates/firefoxDebug-deployment.yaml +++ b/stable/selenium/templates/firefoxDebug-deployment.yaml @@ -18,6 +18,9 @@ spec: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" + {{- with .Values.firefoxDebug.podLabels }} + {{ toYaml .| indent 2 }} + {{- end }} {{- if .Values.firefoxDebug.podAnnotations }} annotations: {{ toYaml .Values.firefoxDebug.podAnnotations | indent 8 }} diff --git a/stable/selenium/templates/hub-deployment.yaml b/stable/selenium/templates/hub-deployment.yaml index e1705dfdf30b..a0a1e44b59a3 100644 --- a/stable/selenium/templates/hub-deployment.yaml +++ b/stable/selenium/templates/hub-deployment.yaml @@ -17,6 +17,9 @@ spec: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" + {{- with .Values.hub.podLabels }} + {{ toYaml .| indent 2 }} + {{- end }} {{- if .Values.hub.podAnnotations }} annotations: {{ toYaml .Values.hub.podAnnotations | indent 8 }} diff --git a/stable/selenium/values.yaml b/stable/selenium/values.yaml index c82d64d245ab..d8862e2fcb18 100644 --- a/stable/selenium/values.yaml +++ b/stable/selenium/values.yaml @@ -93,6 +93,8 @@ hub: ## Configure annotations on the hub pod podAnnotations: {} + ## Configure labels on the hub pod + podLabels: {} ## The type of service to create ## Values: ClusterIP, NodePort, LoadBalancer, or ExternalName @@ -181,6 +183,8 @@ chrome: ## Configure annotations on the chrome pods podAnnotations: {} + ## Configure Labels on the chrome pods + podLabels: {} # Configure security context on the chrome pods # securityContext: @@ -286,6 +290,8 @@ chromeDebug: ## Configure annotations on the chrome debug pods podAnnotations: {} + ## Configure labels on the chrome debug pods + podLabels: {} # Configure security context on the chrome debug pods # securityContext: @@ -390,6 +396,8 @@ firefox: ## Configure annotations on the firefox pods podAnnotations: {} + ## Configure labels on the firefox pods + podLabels: {} # Configure security context on the firefox pods # securityContext: @@ -481,6 +489,8 @@ firefoxDebug: ## Configure annotations on the firefox debug pods podAnnotations: {} + ## Configure labels on the firefox debug pods + podLabels: {} # Configure security context on the firefox debug pods # securityContext: