From 9106ba146d243e4cf8f26751dbe167fa823ef19c Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Mon, 19 Aug 2024 23:17:04 +0000 Subject: [PATCH] chart(fix): Remove alias from sub-chart to prevent render issue in other CD tools Signed-off-by: Viet Nguyen Duc --- .circleci/config.yml | 8 ++++---- .github/workflows/helm-chart-test.yml | 8 ++++---- charts/selenium-grid/Chart.yaml | 1 - charts/selenium-grid/values.yaml | 2 +- tests/charts/ci/base-tls-values.yaml | 2 +- tests/charts/make/chart_release.sh | 7 +++++++ 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 41bd69c03..63332eef6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,7 +34,7 @@ workflows: name: "K8s test - Autoscaling Jobs - HTTPS" platforms: linux/arm64 machine-type: ubuntu2204arm64large - k8s-version: 'v1.28.12' + k8s-version: 'v1.28.13' test-strategy: job_https cluster: 'minikube' helm-version: 'v3.13.3' @@ -43,7 +43,7 @@ workflows: name: "K8s test - Autoscaling Jobs - Ingress hostname" platforms: linux/arm64 machine-type: ubuntu2204arm64large - k8s-version: 'v1.29.7' + k8s-version: 'v1.29.8' test-strategy: job_hostname cluster: 'minikube' helm-version: 'v3.14.4' @@ -52,10 +52,10 @@ workflows: name: "K8s test - Autoscaling Deployments - HTTPS" platforms: linux/arm64 machine-type: ubuntu2204arm64large - k8s-version: 'v1.30.3' + k8s-version: 'v1.30.4' test-strategy: deployment_https cluster: 'minikube' - helm-version: 'v3.15.3' + helm-version: 'v3.15.4' test-upgrade: true - docker-test: name: "Docker test - Use random user (true)" diff --git a/.github/workflows/helm-chart-test.yml b/.github/workflows/helm-chart-test.yml index 995abba7c..136e387fb 100644 --- a/.github/workflows/helm-chart-test.yml +++ b/.github/workflows/helm-chart-test.yml @@ -49,20 +49,20 @@ jobs: cluster: 'minikube' helm-version: 'v3.12.3' test-upgrade: true - - k8s-version: 'v1.28.12' + - k8s-version: 'v1.28.13' test-strategy: job_https cluster: 'minikube' helm-version: 'v3.13.3' test-upgrade: true - - k8s-version: 'v1.29.7' + - k8s-version: 'v1.29.8' test-strategy: job_hostname cluster: 'minikube' helm-version: 'v3.14.4' test-upgrade: true - - k8s-version: 'v1.30.3' + - k8s-version: 'v1.30.4' test-strategy: deployment_https cluster: 'minikube' - helm-version: 'v3.15.3' + helm-version: 'v3.15.4' test-upgrade: true env: CLUSTER: ${{ matrix.cluster }} diff --git a/charts/selenium-grid/Chart.yaml b/charts/selenium-grid/Chart.yaml index 45d212b28..5829e4f84 100644 --- a/charts/selenium-grid/Chart.yaml +++ b/charts/selenium-grid/Chart.yaml @@ -21,7 +21,6 @@ dependencies: - repository: https://prometheus-community.github.io/helm-charts version: 61.8.0 name: kube-prometheus-stack - alias: prometheus-stack condition: monitoring.enabled, prometheus-stack.enabled maintainers: - name: SeleniumHQ diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index 7c9b54398..5d3a8130a 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -1325,7 +1325,7 @@ ingress-nginx: admissionWebhooks: enabled: false -prometheus-stack: +kube-prometheus-stack: # enabled: false cleanPrometheusOperatorObjectNames: true diff --git a/tests/charts/ci/base-tls-values.yaml b/tests/charts/ci/base-tls-values.yaml index 45c6cc3ae..1d34b11e6 100644 --- a/tests/charts/ci/base-tls-values.yaml +++ b/tests/charts/ci/base-tls-values.yaml @@ -5,7 +5,7 @@ registrationSecret: monitoring: enabled: false -prometheus-stack: +kube-prometheus-stack: cleanPrometheusOperatorObjectNames: true defaultRules: create: true diff --git a/tests/charts/make/chart_release.sh b/tests/charts/make/chart_release.sh index 358128ece..cf0782fa0 100755 --- a/tests/charts/make/chart_release.sh +++ b/tests/charts/make/chart_release.sh @@ -12,6 +12,13 @@ on_failure() { # Trap ERR signal and call on_failure function trap 'on_failure' ERR +latest_chart_version=$(find . \( -type d -name .git -prune \) -o -type f -wholename '*/selenium-grid/Chart.yaml' -print0 | xargs -0 cat | grep ^version | cut -d ':' -f 2 | tr -d '[:space:]') +helm template oci://registry-1.docker.io/${NAMESPACE}/selenium-grid --version ${latest_chart_version} +if [[ $? -eq 0 ]]; then + echo "Chart version $latest_chart_version is already available in the registry" + exit 0 +fi + CHART_PACKAGE_PATH=$(cat /tmp/selenium_chart_version) if [ -z "${CHART_PACKAGE_PATH}" ] || [ ! -f "${CHART_PACKAGE_PATH}" ]; then echo "Chart package path is empty. Please trigger chart_build.sh before this script."