Skip to content

Commit

Permalink
K8s: Allow adjutment of component replica count (#2600)
Browse files Browse the repository at this point in the history
* Allow adjutment of router replica count

* Update config README

Signed-off-by: Viet Nguyen Duc <[email protected]>

* Add replicas to values.yaml for all component

Signed-off-by: Viet Nguyen Duc <[email protected]>

---------

Signed-off-by: Viet Nguyen Duc <[email protected]>
Co-authored-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
joshfng and VietND96 authored Jan 21, 2025
1 parent f4779d7 commit e10551d
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 6 deletions.
6 changes: 6 additions & 0 deletions charts/selenium-grid/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
| 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) |
Expand Down Expand Up @@ -223,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 |
Expand All @@ -248,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) |
Expand All @@ -271,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 |
Expand All @@ -296,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 |
Expand Down Expand Up @@ -334,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) |
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/distributor-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/event-bus-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/hub-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/router-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/session-map-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 12 additions & 0 deletions charts/selenium-grid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,8 @@ components:
limits:
cpu: "1"
memory: "2Gi"
# -- Number of replicas
replicas: 1
# -- SecurityContext for router container
securityContext: {}
# -- Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
Expand Down Expand Up @@ -564,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)
Expand Down Expand Up @@ -625,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)
Expand Down Expand Up @@ -682,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)
Expand Down Expand Up @@ -752,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)
Expand Down Expand Up @@ -895,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)
Expand Down

0 comments on commit e10551d

Please sign in to comment.