diff --git a/charts/selenium-grid/README.md b/charts/selenium-grid/README.md index 04743a368..8e67fb6d4 100644 --- a/charts/selenium-grid/README.md +++ b/charts/selenium-grid/README.md @@ -106,7 +106,7 @@ This table contains the configuration parameters of the chart and their default | `autoscaling.deregisterLifecycle` | See `values.yaml` | Lifecycle applied to pods of deployments controlled by KEDA. Makes the node deregister from selenium hub | | `chromeNode.enabled` | `true` | Enable chrome nodes | | `chromeNode.deploymentEnabled` | `true` | Enable creation of Deployment for chrome nodes | -| `chromeNode.replicas` | `1` | Number of chrome nodes | +| `chromeNode.replicas` | `1` | Number of chrome nodes. Disabled if autoscaling is enabled. | | `chromeNode.imageName` | `selenium/node-chrome` | Image of chrome nodes | | `chromeNode.imageTag` | `4.12.1-20230904` | Image of chrome nodes | | `chromeNode.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | @@ -139,9 +139,10 @@ This table contains the configuration parameters of the chart and their default | `chromeNode.hpa.browserName` | `chrome` | BrowserName from the capability | | `chromeNode.hpa.browserVersion` | `` | BrowserVersion from the capability | | `chromeNode.maxReplicaCount` | `8` | Max number of replicas that this browsernode can auto scale up to | +| `chromeNode.minReplicaCount` | `1` | Min number of replicas that this browsernode has when jobs are running | | `firefoxNode.enabled` | `true` | Enable firefox nodes | | `firefoxNode.deploymentEnabled` | `true` | Enable creation of Deployment for firefox nodes | -| `firefoxNode.replicas` | `1` | Number of firefox nodes | +| `firefoxNode.replicas` | `1` | Number of firefox nodes. Disabled if autoscaling is enabled. | | `firefoxNode.imageName` | `selenium/node-firefox` | Image of firefox nodes | | `firefoxNode.imageTag` | `4.12.1-20230904` | Image of firefox nodes | | `firefoxNode.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | @@ -174,9 +175,10 @@ This table contains the configuration parameters of the chart and their default | `firefoxNode.hpa.browserName` | `firefox` | BrowserName from the capability | | `firefoxNode.hpa.browserVersion` | `` | BrowserVersion from the capability | | `firefoxNode.maxReplicaCount` | `8` | Max number of replicas that this browsernode can auto scale up to | +| `firefoxNode.minReplicaCount` | `1` | Min number of replicas that this browsernode has when jobs are running | | `edgeNode.enabled` | `true` | Enable edge nodes | | `edgeNode.deploymentEnabled` | `true` | Enable creation of Deployment for edge nodes | -| `edgeNode.replicas` | `1` | Number of edge nodes | +| `edgeNode.replicas` | `1` | Number of edge nodes. Disabled if autoscaling is enabled. | | `edgeNode.imageName` | `selenium/node-edge` | Image of edge nodes | | `edgeNode.imageTag` | `4.12.1-20230904` | Image of edge nodes | | `edgeNode.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | @@ -209,6 +211,7 @@ This table contains the configuration parameters of the chart and their default | `edgeNode.hpa.browserName` | `edge` | BrowserName from the capability | | `edgeNode.hpa.browserVersion` | `` | BrowserVersion from the capability | | `edgeNode.maxReplicaCount` | `8` | Max number of replicas that this browsernode can auto scale up to | +| `edgeNode.minReplicaCount` | `1` | Min number of replicas that this browsernode has when jobs are running | | `customLabels` | `{}` | Custom labels for k8s resources | | `customLabels` | `{}` | Custom labels for k8s resources | diff --git a/charts/selenium-grid/templates/chrome-node-deployment.yaml b/charts/selenium-grid/templates/chrome-node-deployment.yaml index e519b11ce..0b3d2a9b5 100644 --- a/charts/selenium-grid/templates/chrome-node-deployment.yaml +++ b/charts/selenium-grid/templates/chrome-node-deployment.yaml @@ -15,7 +15,9 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + {{- if and (not .Values.autoscaling.enabled) (not .Values.autoscaling.enableWithExistingKEDA) }} replicas: {{ .Values.chromeNode.replicas }} + {{end}} selector: matchLabels: app: selenium-chrome-node diff --git a/charts/selenium-grid/templates/chrome-node-hpa.yaml b/charts/selenium-grid/templates/chrome-node-hpa.yaml index 5e93781ee..7cb78043c 100644 --- a/charts/selenium-grid/templates/chrome-node-hpa.yaml +++ b/charts/selenium-grid/templates/chrome-node-hpa.yaml @@ -12,6 +12,7 @@ metadata: deploymentName: {{ template "seleniumGrid.chromeNode.fullname" . }} spec: maxReplicaCount: {{ .Values.chromeNode.maxReplicaCount }} + minReplicaCount: {{ .Values.chromeNode.minReplicaCount }} scaleTargetRef: name: {{ template "seleniumGrid.chromeNode.fullname" . }} triggers: diff --git a/charts/selenium-grid/templates/edge-node-deployment.yaml b/charts/selenium-grid/templates/edge-node-deployment.yaml index 55ef07783..883a45a76 100644 --- a/charts/selenium-grid/templates/edge-node-deployment.yaml +++ b/charts/selenium-grid/templates/edge-node-deployment.yaml @@ -15,7 +15,9 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + {{- if and (not .Values.autoscaling.enabled) (not .Values.autoscaling.enableWithExistingKEDA) }} replicas: {{ .Values.edgeNode.replicas }} + {{end}} selector: matchLabels: app: selenium-edge-node diff --git a/charts/selenium-grid/templates/edge-node-hpa.yaml b/charts/selenium-grid/templates/edge-node-hpa.yaml index 6e7d94001..b115de353 100644 --- a/charts/selenium-grid/templates/edge-node-hpa.yaml +++ b/charts/selenium-grid/templates/edge-node-hpa.yaml @@ -12,6 +12,7 @@ metadata: deploymentName: {{ template "seleniumGrid.edgeNode.fullname" . }} spec: maxReplicaCount: {{ .Values.edgeNode.maxReplicaCount }} + minReplicaCount: {{ .Values.edgeNode.minReplicaCount }} scaleTargetRef: name: {{ template "seleniumGrid.edgeNode.fullname" . }} triggers: diff --git a/charts/selenium-grid/templates/firefox-node-deployment.yaml b/charts/selenium-grid/templates/firefox-node-deployment.yaml index 9b3433ca5..d0b250470 100644 --- a/charts/selenium-grid/templates/firefox-node-deployment.yaml +++ b/charts/selenium-grid/templates/firefox-node-deployment.yaml @@ -15,7 +15,9 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + {{- if and (not .Values.autoscaling.enabled) (not .Values.autoscaling.enableWithExistingKEDA) }} replicas: {{ .Values.firefoxNode.replicas }} + {{end}} selector: matchLabels: app: selenium-firefox-node diff --git a/charts/selenium-grid/templates/firefox-node-hpa.yaml b/charts/selenium-grid/templates/firefox-node-hpa.yaml index 3f3001f66..70a463e79 100644 --- a/charts/selenium-grid/templates/firefox-node-hpa.yaml +++ b/charts/selenium-grid/templates/firefox-node-hpa.yaml @@ -12,6 +12,7 @@ metadata: deploymentName: {{ template "seleniumGrid.firefoxNode.fullname" . }} spec: maxReplicaCount: {{ .Values.firefoxNode.maxReplicaCount }} + minReplicaCount: {{ .Values.firefoxNode.minReplicaCount }} scaleTargetRef: name: {{ template "seleniumGrid.firefoxNode.fullname" . }} triggers: diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index bb90f2e1b..4bb3989e9 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -472,6 +472,7 @@ chromeNode: # claimName: my-pv-claim maxReplicaCount: 8 + minReplicaCount: 1 hpa: url: '{{ include "seleniumGrid.graphqlURL" . }}' browserName: chrome @@ -587,6 +588,7 @@ firefoxNode: # persistentVolumeClaim: # claimName: my-pv-claim maxReplicaCount: 8 + minReplicaCount: 1 hpa: url: '{{ include "seleniumGrid.graphqlURL" . }}' browserName: firefox @@ -700,6 +702,7 @@ edgeNode: # persistentVolumeClaim: # claimName: my-pv-claim maxReplicaCount: 8 + minReplicaCount: 1 hpa: url: '{{ include "seleniumGrid.graphqlURL" . }}' browserName: MicrosoftEdge