From ed25de390e1c86ce458aaa8415120304e1e6c3bf Mon Sep 17 00:00:00 2001 From: joshfng Date: Mon, 20 Jan 2025 14:32:34 -0500 Subject: [PATCH 1/3] Allow adjutment of router replica count --- charts/selenium-grid/templates/router-deployment.yaml | 2 +- charts/selenium-grid/values.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/selenium-grid/templates/router-deployment.yaml b/charts/selenium-grid/templates/router-deployment.yaml index 9cea726d6b..b9414452e1 100644 --- a/charts/selenium-grid/templates/router-deployment.yaml +++ b/charts/selenium-grid/templates/router-deployment.yaml @@ -14,7 +14,7 @@ metadata: spec: strategy: {{- template "seleniumGrid.updateStrategy" (list $.Values.components.router $.Values.global.seleniumGrid) }} - replicas: 1 + replicas: {{ max 1 (.Values.components.router.replicas | int) }} revisionHistoryLimit: {{ .Values.global.seleniumGrid.revisionHistoryLimit }} selector: matchLabels: diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index e8c329de97..0684c2f3be 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -476,6 +476,7 @@ components: limits: cpu: "1" memory: "2Gi" + replicas: 1 # -- SecurityContext for router container securityContext: {} # -- Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) From 16bd59d0744e7f7ffc45b6657462ffcc86db8926 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Tue, 21 Jan 2025 02:51:06 +0700 Subject: [PATCH 2/3] Update config README Signed-off-by: Viet Nguyen Duc --- charts/selenium-grid/CONFIGURATION.md | 1 + charts/selenium-grid/values.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/charts/selenium-grid/CONFIGURATION.md b/charts/selenium-grid/CONFIGURATION.md index 218dd5e86b..b53067a769 100644 --- a/charts/selenium-grid/CONFIGURATION.md +++ b/charts/selenium-grid/CONFIGURATION.md @@ -195,6 +195,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | components.router.readinessProbe | object | `{"enabled":true,"failureThreshold":10,"initialDelaySeconds":12,"path":"/readyz","periodSeconds":10,"successThreshold":1,"timeoutSeconds":10}` | Readiness probe settings | | components.router.livenessProbe | object | `{"enabled":true,"failureThreshold":30,"initialDelaySeconds":60,"path":"/readyz","periodSeconds":60,"successThreshold":1,"timeoutSeconds":60}` | Liveness probe settings | | components.router.resources | object | `{"limits":{"cpu":"1","memory":"2Gi"},"requests":{"cpu":"0.5","memory":"512Mi"}}` | Resources for router container | +| components.router.replicas | int | `1` | Number of replicas for router | | components.router.securityContext | object | `{}` | SecurityContext for router container | | components.router.serviceType | string | `"ClusterIP"` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | | components.router.clusterIP | string | `""` | Set specific clusterIP when serviceType is ClusterIP (see https://kubernetes.io/docs/concepts/services-networking/service/#type-clusterip) | diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index 0684c2f3be..b20af26213 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -476,6 +476,7 @@ components: limits: cpu: "1" memory: "2Gi" + # -- Number of replicas for router replicas: 1 # -- SecurityContext for router container securityContext: {} From 7551055fbc2e449a6c5c7d5c173f0321215fdeea Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Tue, 21 Jan 2025 07:51:02 +0700 Subject: [PATCH 3/3] Add replicas to values.yaml for all component Signed-off-by: Viet Nguyen Duc --- charts/selenium-grid/CONFIGURATION.md | 7 ++++++- .../templates/distributor-deployment.yaml | 2 +- .../templates/event-bus-deployment.yaml | 2 +- charts/selenium-grid/templates/hub-deployment.yaml | 2 +- .../selenium-grid/templates/router-deployment.yaml | 2 +- .../templates/session-map-deployment.yaml | 2 +- .../templates/session-queue-deployment.yaml | 2 +- charts/selenium-grid/values.yaml | 12 +++++++++++- 8 files changed, 23 insertions(+), 8 deletions(-) diff --git a/charts/selenium-grid/CONFIGURATION.md b/charts/selenium-grid/CONFIGURATION.md index b53067a769..9f2b1e1f57 100644 --- a/charts/selenium-grid/CONFIGURATION.md +++ b/charts/selenium-grid/CONFIGURATION.md @@ -195,7 +195,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | components.router.readinessProbe | object | `{"enabled":true,"failureThreshold":10,"initialDelaySeconds":12,"path":"/readyz","periodSeconds":10,"successThreshold":1,"timeoutSeconds":10}` | Readiness probe settings | | components.router.livenessProbe | object | `{"enabled":true,"failureThreshold":30,"initialDelaySeconds":60,"path":"/readyz","periodSeconds":60,"successThreshold":1,"timeoutSeconds":60}` | Liveness probe settings | | components.router.resources | object | `{"limits":{"cpu":"1","memory":"2Gi"},"requests":{"cpu":"0.5","memory":"512Mi"}}` | Resources for router container | -| components.router.replicas | int | `1` | Number of replicas for router | +| components.router.replicas | int | `1` | Number of replicas | | components.router.securityContext | object | `{}` | SecurityContext for router container | | components.router.serviceType | string | `"ClusterIP"` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | | components.router.clusterIP | string | `""` | Set specific clusterIP when serviceType is ClusterIP (see https://kubernetes.io/docs/concepts/services-networking/service/#type-clusterip) | @@ -224,6 +224,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | components.distributor.readinessProbe | object | `{"enabled":true,"failureThreshold":10,"initialDelaySeconds":12,"path":"/readyz","periodSeconds":10,"successThreshold":1,"timeoutSeconds":10}` | Readiness probe settings | | components.distributor.livenessProbe | object | `{"enabled":true,"failureThreshold":30,"initialDelaySeconds":60,"path":"/readyz","periodSeconds":60,"successThreshold":1,"timeoutSeconds":60}` | Liveness probe settings | | components.distributor.resources | object | `{"limits":{"cpu":"1","memory":"2Gi"},"requests":{"cpu":"0.5","memory":"512Mi"}}` | Resources for Distributor container | +| components.distributor.replicas | int | `1` | Number of replicas | | components.distributor.securityContext | object | `{}` | SecurityContext for Distributor container | | components.distributor.serviceType | string | `"ClusterIP"` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | | components.distributor.serviceAnnotations | object | `{}` | Custom annotations for Distributor service | @@ -249,6 +250,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | components.eventBus.subscribePort | int | `4443` | Container port where to subscribe for events | | components.eventBus.subscribeNodePort | int | `30443` | NodePort exposed where to subscribe for events | | components.eventBus.resources | object | `{"limits":{"cpu":"1","memory":"2Gi"},"requests":{"cpu":"0.5","memory":"512Mi"}}` | Resources for event-bus container | +| components.eventBus.replicas | int | `1` | Number of replicas | | components.eventBus.securityContext | object | `{}` | SecurityContext for event-bus container | | components.eventBus.serviceType | string | `"ClusterIP"` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | | components.eventBus.clusterIP | string | `""` | Set specific clusterIP when serviceType is ClusterIP (see https://kubernetes.io/docs/concepts/services-networking/service/#type-clusterip) | @@ -272,6 +274,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | components.sessionMap.annotations | object | `{}` | Custom annotations for Session Map pods | | components.sessionMap.port | int | `5556` | Session Map container port | | components.sessionMap.resources | object | `{"limits":{"cpu":"1","memory":"1Gi"},"requests":{"cpu":"0.5","memory":"512Mi"}}` | Resources for Session Map container | +| components.sessionMap.replicas | int | `1` | Number of replicas | | components.sessionMap.securityContext | object | `{}` | SecurityContext for Session Map container | | components.sessionMap.serviceType | string | `"ClusterIP"` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | | components.sessionMap.serviceAnnotations | object | `{}` | Custom annotations for Session Map service | @@ -297,6 +300,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | components.sessionQueue.port | int | `5559` | Session Queue container port | | components.sessionQueue.nodePort | int | `30559` | Session Queue expose NodePort | | components.sessionQueue.resources | object | `{"limits":{"cpu":"1","memory":"1Gi"},"requests":{"cpu":"0.5","memory":"512Mi"}}` | Resources for Session Queue container | +| components.sessionQueue.replicas | int | `1` | Number of replicas | | components.sessionQueue.securityContext | object | `{}` | SecurityContext for Session Queue container | | components.sessionQueue.serviceType | string | `"ClusterIP"` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | | components.sessionQueue.serviceAnnotations | object | `{}` | Custom annotations for Session Queue service | @@ -335,6 +339,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | hub.extraVolumeMounts | list | `[]` | Extra volume mounts for Hub container | | hub.extraVolumes | list | `[]` | Extra volumes for Hub pod | | hub.resources | object | `{"limits":{"cpu":"1","memory":"2Gi"},"requests":{"cpu":"0.5","memory":"1Gi"}}` | Resources for selenium-hub container | +| hub.replicas | int | `1` | Number of replicas | | hub.securityContext | object | `{}` | SecurityContext for selenium-hub container | | hub.serviceType | string | `"ClusterIP"` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | | hub.clusterIP | string | `""` | Set specific clusterIP when serviceType is ClusterIP (see https://kubernetes.io/docs/concepts/services-networking/service/#type-clusterip) | diff --git a/charts/selenium-grid/templates/distributor-deployment.yaml b/charts/selenium-grid/templates/distributor-deployment.yaml index 741f6b79a1..9b789af2dd 100644 --- a/charts/selenium-grid/templates/distributor-deployment.yaml +++ b/charts/selenium-grid/templates/distributor-deployment.yaml @@ -14,7 +14,7 @@ metadata: spec: strategy: {{- template "seleniumGrid.updateStrategy" (list $.Values.components.distributor $.Values.global.seleniumGrid) }} - replicas: 1 + replicas: {{ max 1 (.Values.components.distributor.replicas | int) }} revisionHistoryLimit: {{ .Values.global.seleniumGrid.revisionHistoryLimit }} selector: matchLabels: diff --git a/charts/selenium-grid/templates/event-bus-deployment.yaml b/charts/selenium-grid/templates/event-bus-deployment.yaml index ac1e0d9c5e..5c027e6534 100644 --- a/charts/selenium-grid/templates/event-bus-deployment.yaml +++ b/charts/selenium-grid/templates/event-bus-deployment.yaml @@ -14,7 +14,7 @@ metadata: spec: strategy: {{- template "seleniumGrid.updateStrategy" (list $.Values.components.eventBus $.Values.global.seleniumGrid) }} - replicas: 1 + replicas: {{ max 1 (.Values.components.eventBus.replicas | int) }} revisionHistoryLimit: {{ .Values.global.seleniumGrid.revisionHistoryLimit }} selector: matchLabels: diff --git a/charts/selenium-grid/templates/hub-deployment.yaml b/charts/selenium-grid/templates/hub-deployment.yaml index 20e3ddc668..41d726173d 100644 --- a/charts/selenium-grid/templates/hub-deployment.yaml +++ b/charts/selenium-grid/templates/hub-deployment.yaml @@ -17,7 +17,7 @@ metadata: spec: strategy: {{- template "seleniumGrid.updateStrategy" (list $.Values.hub $.Values.global.seleniumGrid) }} - replicas: 1 + replicas: {{ max 1 (.Values.hub.replicas | int) }} revisionHistoryLimit: {{ .Values.global.seleniumGrid.revisionHistoryLimit }} selector: matchLabels: diff --git a/charts/selenium-grid/templates/router-deployment.yaml b/charts/selenium-grid/templates/router-deployment.yaml index b9414452e1..c5702d9439 100644 --- a/charts/selenium-grid/templates/router-deployment.yaml +++ b/charts/selenium-grid/templates/router-deployment.yaml @@ -14,7 +14,7 @@ metadata: spec: strategy: {{- template "seleniumGrid.updateStrategy" (list $.Values.components.router $.Values.global.seleniumGrid) }} - replicas: {{ max 1 (.Values.components.router.replicas | int) }} + replicas: {{ max 1 ($.Values.components.router.replicas | int) }} revisionHistoryLimit: {{ .Values.global.seleniumGrid.revisionHistoryLimit }} selector: matchLabels: diff --git a/charts/selenium-grid/templates/session-map-deployment.yaml b/charts/selenium-grid/templates/session-map-deployment.yaml index c6f17dcc1a..37a3f20b67 100644 --- a/charts/selenium-grid/templates/session-map-deployment.yaml +++ b/charts/selenium-grid/templates/session-map-deployment.yaml @@ -14,7 +14,7 @@ metadata: spec: strategy: {{- template "seleniumGrid.updateStrategy" (list $.Values.components.sessionMap $.Values.global.seleniumGrid) }} - replicas: 1 + replicas: {{ max 1 (.Values.components.sessionMap.replicas | int) }} revisionHistoryLimit: {{ .Values.global.seleniumGrid.revisionHistoryLimit }} selector: matchLabels: diff --git a/charts/selenium-grid/templates/session-queue-deployment.yaml b/charts/selenium-grid/templates/session-queue-deployment.yaml index c5ce89fc86..410aa56419 100644 --- a/charts/selenium-grid/templates/session-queue-deployment.yaml +++ b/charts/selenium-grid/templates/session-queue-deployment.yaml @@ -14,7 +14,7 @@ metadata: spec: strategy: {{- template "seleniumGrid.updateStrategy" (list $.Values.components.sessionQueue $.Values.global.seleniumGrid) }} - replicas: 1 + replicas: {{ max 1 (.Values.components.sessionQueue.replicas | int) }} revisionHistoryLimit: {{ .Values.global.seleniumGrid.revisionHistoryLimit }} selector: matchLabels: diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index b20af26213..c34be5b445 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -476,7 +476,7 @@ components: limits: cpu: "1" memory: "2Gi" - # -- Number of replicas for router + # -- Number of replicas replicas: 1 # -- SecurityContext for router container securityContext: {} @@ -566,6 +566,8 @@ components: limits: cpu: "1" memory: "2Gi" + # -- Number of replicas + replicas: 1 # -- SecurityContext for Distributor container securityContext: {} # -- Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) @@ -627,6 +629,8 @@ components: limits: cpu: "1" memory: "2Gi" + # -- Number of replicas + replicas: 1 # -- SecurityContext for event-bus container securityContext: {} # -- Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) @@ -684,6 +688,8 @@ components: limits: cpu: "1" memory: "1Gi" + # -- Number of replicas + replicas: 1 # -- SecurityContext for Session Map container securityContext: {} # -- Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) @@ -754,6 +760,8 @@ components: limits: cpu: "1" memory: "1Gi" + # -- Number of replicas + replicas: 1 # -- SecurityContext for Session Queue container securityContext: {} # -- Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) @@ -897,6 +905,8 @@ hub: limits: cpu: "1" memory: "2Gi" + # -- Number of replicas + replicas: 1 # -- SecurityContext for selenium-hub container securityContext: {} # -- Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)