From c6055ffc07ef70a91072d3335480a6cf7f8d55df Mon Sep 17 00:00:00 2001 From: Amar Deep Singh Date: Fri, 10 Nov 2023 10:30:04 +0530 Subject: [PATCH 1/4] feat(chart-test):added workflow to lint test chart --- .github/workflows/helm-chart-test.yml | 54 +++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/helm-chart-test.yml diff --git a/.github/workflows/helm-chart-test.yml b/.github/workflows/helm-chart-test.yml new file mode 100644 index 000000000..6bcf1eae4 --- /dev/null +++ b/.github/workflows/helm-chart-test.yml @@ -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 }} \ No newline at end of file From 707f660ce43d3272da44cf94c16a6f71fa945344 Mon Sep 17 00:00:00 2001 From: Amar Deep Singh Date: Fri, 10 Nov 2023 10:38:56 +0530 Subject: [PATCH 2/4] fix(docs):Added Maintainer info --- charts/selenium-grid/Chart.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/charts/selenium-grid/Chart.yaml b/charts/selenium-grid/Chart.yaml index f68a7851c..9a6d510b2 100644 --- a/charts/selenium-grid/Chart.yaml +++ b/charts/selenium-grid/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: selenium-grid description: A Helm chart for creating a Selenium Grid Server in Kubernetes type: application -version: 0.24.0 +version: 0.25.0 appVersion: 4.15.0-20231102 icon: https://github.com/SeleniumHQ/docker-selenium/raw/trunk/logo.png dependencies: @@ -10,3 +10,8 @@ dependencies: version: 2.12.0 name: keda condition: autoscaling.enabled +maintainers: + - name: SeleniumHQ + email: selenium-developers@googlegroups.com +sources: + - https://github.com/SeleniumHQ/docker-selenium \ No newline at end of file From ccde2ca2cd3989cffe4fc6764dd67648bdc3709c Mon Sep 17 00:00:00 2001 From: Amar Deep Singh Date: Fri, 10 Nov 2023 10:45:28 +0530 Subject: [PATCH 3/4] fix(lint-issue): New line at end of file --- charts/selenium-grid/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/selenium-grid/Chart.yaml b/charts/selenium-grid/Chart.yaml index 9a6d510b2..79e5bf68f 100644 --- a/charts/selenium-grid/Chart.yaml +++ b/charts/selenium-grid/Chart.yaml @@ -14,4 +14,4 @@ maintainers: - name: SeleniumHQ email: selenium-developers@googlegroups.com sources: - - https://github.com/SeleniumHQ/docker-selenium \ No newline at end of file + - https://github.com/SeleniumHQ/docker-selenium From dccb06b0dcefc14701162d920f88fdcf244df23f Mon Sep 17 00:00:00 2001 From: Amar Deep Singh Date: Fri, 10 Nov 2023 10:55:35 +0530 Subject: [PATCH 4/4] fix(linting-issues): Few more linting issues --- charts/selenium-grid/values.yaml | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index 9f8cc1926..aa5a1d9f0 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -5,16 +5,16 @@ global: # Image tag for browser's nodes nodesImageTag: 4.15.0-20231108 # 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 @@ -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: @@ -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. @@ -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 @@ -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