Skip to content

Commit

Permalink
feat(helm-test): Added helm test and linting (#2003)
Browse files Browse the repository at this point in the history
* feat(helm-test): Added helm test and linting

* chore(appversion): Bumped up chart version

---------

Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
  • Loading branch information
amardeep2006 and diemol authored Nov 14, 2023
1 parent f038e69 commit 35a044a
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 20 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/helm-chart-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Lint and Test Helm Charts

on: pull_request

jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.13.2

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.event.repository.default_branch }}

- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@v1.8.0

- name: Build Helm Charts
if: steps.list-changed.outputs.changed == 'true'
run: |
helm repo add kedacore https://kedacore.github.io/charts
helm repo update
cd charts
helm dependency build selenium-grid
- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --target-branch ${{ github.event.repository.default_branch }}
9 changes: 7 additions & 2 deletions charts/selenium-grid/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ apiVersion: v2
name: selenium-grid
description: A Helm chart for creating a Selenium Grid Server in Kubernetes
type: application
version: 0.24.0
appVersion: 4.15.0-20231102
version: 0.25.0
appVersion: 4.15.0-20231110
icon: https://github.com/SeleniumHQ/docker-selenium/raw/trunk/logo.png
dependencies:
- repository: https://kedacore.github.io/charts
version: 2.12.0
name: keda
condition: autoscaling.enabled
maintainers:
- name: SeleniumHQ
email: selenium-developers@googlegroups.com
sources:
- https://github.com/SeleniumHQ/docker-selenium
36 changes: 18 additions & 18 deletions charts/selenium-grid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ global:
# Image tag for browser's nodes
nodesImageTag: 4.15.0-20231110
# Pull secret for all components, can be overridden individually
imagePullSecret: ""
imagePullSecret: ""

# Basic auth settings for Selenium Grid
basicAuth:
# Enable or disable basic auth
enabled: true
# Username for basic auth
username: admin
# Password for basic auth
password: admin
# Enable or disable basic auth
enabled: true
# Username for basic auth
username: admin
# Password for basic auth
password: admin

# Deploy Router, Distributor, EventBus, SessionMap and Nodes separately
isolateComponents: false
Expand Down Expand Up @@ -358,7 +358,7 @@ autoscaling:
maxReplicaCount: 8
pollingInterval: 10
# List of triggers. Be careful, the default trigger of selenium-grid will be overwritten if you specify this
#triggers:
# triggers:
# Options for KEDA ScaledJobs (only used when scalingType is set to "job")
# see https://keda.sh/docs/latest/concepts/scaling-jobs/#scaledjob-spec
scaledJobOptions:
Expand Down Expand Up @@ -504,14 +504,14 @@ chromeNode:
# claimName: my-pv-claim

# Override the scaled options for chrome nodes
#scaledOptions:
#scaledJobOptions:
#scaledObjectOptions:
# scaledOptions:
# scaledJobOptions:
# scaledObjectOptions:
hpa:
url: '{{ include "seleniumGrid.graphqlURL" . }}'
browserName: chrome
# browserVersion: '91.0' # Optional. Only required when supporting multiple versions of browser in your Selenium Grid.
unsafeSsl : 'true' # Optional
unsafeSsl: 'true' # Optional

# It is used to add a sidecars proxy in the same pod of the browser node.
# It means it will add a new container to the deployment itself.
Expand Down Expand Up @@ -636,9 +636,9 @@ firefoxNode:
# claimName: my-pv-claim

# Override the scaled options for firefox nodes
#scaledOptions:
#scaledJobOptions:
#scaledObjectOptions:
# scaledOptions:
# scaledJobOptions:
# scaledObjectOptions:
hpa:
url: '{{ include "seleniumGrid.graphqlURL" . }}'
browserName: firefox
Expand Down Expand Up @@ -764,9 +764,9 @@ edgeNode:
# claimName: my-pv-claim

# Override the scaled options for edge nodes
#scaledOptions:
#scaledJobOptions:
#scaledObjectOptions:
# scaledOptions:
# scaledJobOptions:
# scaledObjectOptions:
hpa:
url: '{{ include "seleniumGrid.graphqlURL" . }}'
browserName: MicrosoftEdge
Expand Down

0 comments on commit 35a044a

Please sign in to comment.