Skip to content

Commit

Permalink
Showing 3 changed files with 30 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -447,12 +447,12 @@ chart_test_edge:
./tests/charts/make/chart_test.sh NodeEdge

chart_test_autoscaling_deployment_https:
SE_FULL_DISTRIBUTED_MODE=true SE_ENABLE_INGRESS_HOSTNAME=true SELENIUM_GRID_PROTOCOL=https SELENIUM_GRID_PORT=443 \
CHART_FULL_DISTRIBUTED_MODE=true CHART_ENABLE_INGRESS_HOSTNAME=true CHART_ENABLE_BASIC_AUTH=true SELENIUM_GRID_PROTOCOL=https SELENIUM_GRID_PORT=443 \
VERSION=$(TAG_VERSION) VIDEO_TAG=$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) NAMESPACE=$(NAMESPACE) \
./tests/charts/make/chart_test.sh DeploymentAutoscaling

chart_test_autoscaling_deployment:
SE_ENABLE_TRACING=true SELENIUM_GRID_TEST_HEADLESS=true SELENIUM_GRID_HOST=$$(hostname -i) \
CHART_ENABLE_TRACING=true SELENIUM_GRID_TEST_HEADLESS=true SELENIUM_GRID_HOST=$$(hostname -i) \
VERSION=$(TAG_VERSION) VIDEO_TAG=$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) NAMESPACE=$(NAMESPACE) \
./tests/charts/make/chart_test.sh DeploymentAutoscaling

@@ -462,12 +462,12 @@ chart_test_autoscaling_job_https:
./tests/charts/make/chart_test.sh JobAutoscaling

chart_test_autoscaling_job_hostname:
SE_ENABLE_TRACING=true SE_ENABLE_INGRESS_HOSTNAME=true CHART_ENABLE_BASIC_AUTH=true \
CHART_ENABLE_TRACING=true CHART_ENABLE_INGRESS_HOSTNAME=true CHART_ENABLE_BASIC_AUTH=true \
VERSION=$(TAG_VERSION) VIDEO_TAG=$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) NAMESPACE=$(NAMESPACE) \
./tests/charts/make/chart_test.sh JobAutoscaling

chart_test_autoscaling_job:
SE_ENABLE_TRACING=true SE_FULL_DISTRIBUTED_MODE=true SE_ENABLE_INGRESS_HOSTNAME=true \
CHART_ENABLE_TRACING=true CHART_FULL_DISTRIBUTED_MODE=true CHART_ENABLE_INGRESS_HOSTNAME=true \
VERSION=$(TAG_VERSION) VIDEO_TAG=$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) NAMESPACE=$(NAMESPACE) \
./tests/charts/make/chart_test.sh JobAutoscaling

20 changes: 20 additions & 0 deletions charts/selenium-grid/TESTING.md
Original file line number Diff line number Diff line change
@@ -32,6 +32,26 @@ All related testing to this helm chart will be documented in this file.
| | Extra ports can be exposed on Service via `.service.ports` | ✓ | Cluster |
| | Service type change to `NodePort`, specific NodePort can be set | ✓ | Cluster |

## CI Test Traceability Matrix

We have a CI pipeline to test the Helm chart with the following test cases.

| Matrix | job | deployment | job_https | job_hostname | deployment_https |
|---------------------------|----------|------------|-----------|--------------|------------------|
| Cluster | Kind | Kind | Kind | Minikube | Minikube |
| Kubernetes version | v1.25.16 | v1.26.14 | v1.27.11 | v1.28.7 | v1.29.2 |
| Autoscaling | x | x | x | x | x |
| Scaling type `deployment` | | x | | | x |
| Scaling type `job` | x | | x | x | |
| Full distributed mode | x | | | | x |
| Enable basic auth | | x | | x | x |
| Ingress `hostname` | x | | | x | x |
| Ingress `K8S_PUBLIC_IP` | | x | x | | |
| HTTPS `tls.enabled` | | | x | | x |
| Enable tracing | x | x | | x | |
| Enable video recorder | x | x | x | x | x |
| Test headless | | x | x | | |

## Test Chart Template
- By using `helm template` command, the chart template is tested without installing it to Kubernetes cluster.
- Templates are rendered and the output as a YAML manifest file. The manifest file is then asserted with [pyyaml](https://pyyaml.org/wiki/PyYAMLDocumentation).
12 changes: 6 additions & 6 deletions tests/charts/make/chart_test.sh
Original file line number Diff line number Diff line change
@@ -26,10 +26,10 @@ SKIP_CLEANUP=${SKIP_CLEANUP:-"false"} # For debugging purposes, retain the clust
CHART_CERT_PATH=${CHART_CERT_PATH:-"${CHART_PATH}/certs/selenium.pem"}
SSL_CERT_DIR=${SSL_CERT_DIR:-"/etc/ssl/certs"}
VIDEO_TAG=${VIDEO_TAG:-"latest"}
SE_ENABLE_TRACING=${SE_ENABLE_TRACING:-"false"}
SE_FULL_DISTRIBUTED_MODE=${SE_FULL_DISTRIBUTED_MODE:-"false"}
CHART_ENABLE_TRACING=${CHART_ENABLE_TRACING:-"false"}
CHART_FULL_DISTRIBUTED_MODE=${CHART_FULL_DISTRIBUTED_MODE:-"false"}
HOSTNAME_ADDRESS=${HOSTNAME_ADDRESS:-"selenium-grid.local"}
SE_ENABLE_INGRESS_HOSTNAME=${SE_ENABLE_INGRESS_HOSTNAME:-"false"}
CHART_ENABLE_INGRESS_HOSTNAME=${CHART_ENABLE_INGRESS_HOSTNAME:-"false"}
CHART_ENABLE_BASIC_AUTH=${CHART_ENABLE_BASIC_AUTH:-"false"}
BASIC_AUTH_USERNAME=${BASIC_AUTH_USERNAME:-"sysAdminUser"}
BASIC_AUTH_PASSWORD=${BASIC_AUTH_PASSWORD:-"myStrongPassword"}
@@ -75,11 +75,11 @@ HELM_COMMAND_SET_IMAGES=" \
--set global.seleniumGrid.nodesImageTag=${VERSION} \
--set global.seleniumGrid.videoImageTag=${VIDEO_TAG} \
--set autoscaling.scaledOptions.pollingInterval=${AUTOSCALING_POLL_INTERVAL} \
--set tracing.enabled=${SE_ENABLE_TRACING} \
--set isolateComponents=${SE_FULL_DISTRIBUTED_MODE} \
--set tracing.enabled=${CHART_ENABLE_TRACING} \
--set isolateComponents=${CHART_FULL_DISTRIBUTED_MODE} \
"

if [ "${SE_ENABLE_INGRESS_HOSTNAME}" = "true" ]; then
if [ "${CHART_ENABLE_INGRESS_HOSTNAME}" = "true" ]; then
if [[ ! $(cat /etc/hosts) == *"${HOSTNAME_ADDRESS}"* ]]; then
sudo -- sh -c -e "echo \"$(hostname -i) ${HOSTNAME_ADDRESS}\" >> /etc/hosts"
fi

0 comments on commit 2aa675e

Please sign in to comment.