From 2d9cf04623ba6be3c6ece4f333006ab06fd937a0 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Sun, 27 Oct 2024 11:50:36 +0100 Subject: [PATCH] Fix chart testing action --- .github/workflows/helm-workflow.yaml | 64 ++++++++++++++++++---------- helmfile.yaml | 14 ++++-- 2 files changed, 53 insertions(+), 25 deletions(-) diff --git a/.github/workflows/helm-workflow.yaml b/.github/workflows/helm-workflow.yaml index fb0af23..95d8cf4 100644 --- a/.github/workflows/helm-workflow.yaml +++ b/.github/workflows/helm-workflow.yaml @@ -79,8 +79,6 @@ jobs: if [[ -n "$changed" ]]; then echo "changed=true" >> "$GITHUB_OUTPUT" fi - - name: Setup helmfile - uses: mamezou-tech/setup-helmfile@v1.2.0 - name: Prepare a config for the kind cluster run: | cat > kind-config.yaml < + https://github.com/databus23/helm-diff, https://github.com/jkroepke/helm-secrets + helmfile-args: sync --wait + + - name: Test the db-operator chart install run: | - helmfile -l name=prometheus-stack sync - helmfile sync ct install --target-branch main --charts ./charts/db-operator helmfile destroy - # Test is broken because of the image in the previous version, - # so upgrate can't pass - #- name: Test db-operator charts upgrade - # run: | - # helmfile -l name=prometheus-stack sync - # helmfile sync - # ct install --target-branch main --charts ./charts/db-operator --upgrade - # helmfile destroy + + - uses: helmfile/helmfile-action@v1.0.0 + with: + helmfile-version: 'v0.167.1' + helm-version: 'v3.15.4' + helm-plugins: > + https://github.com/databus23/helm-diff, https://github.com/jkroepke/helm-secrets + helmfile-args: sync --wait + + - name: Test the db-operator chart upgrade + run: | + ct install --target-branch main --charts ./charts/db-operator --upgrade + helmfile destroy + + - uses: helmfile/helmfile-action@v1.0.0 + with: + helmfile-version: 'v0.167.1' + helm-version: 'v3.15.4' + helm-plugins: > + https://github.com/databus23/helm-diff, https://github.com/jkroepke/helm-secrets + helmfile-args: sync --wait + - name: Test db-instances charts install run: | - helmfile -l name=prometheus-stack sync - helmfile sync -e instances - kubectl rollout status deploy/db-operator -n db-operator - kubectl rollout status deploy/db-operator-webhook -n db-operator ct install --target-branch main --charts ./charts/db-instances helmfile destroy - - name: Test db-instances charts install + + - uses: helmfile/helmfile-action@v1.0.0 + with: + helmfile-version: 'v0.167.1' + helm-version: 'v3.15.4' + helm-plugins: > + https://github.com/databus23/helm-diff, https://github.com/jkroepke/helm-secrets + helmfile-args: sync --wait + + - name: Test db-instances charts upgrade run: | - helmfile -l name=prometheus-stack sync - helmfile sync -e instances - kubectl rollout status deploy/db-operator -n db-operator - kubectl rollout status deploy/db-operator-webhook -n db-operator ct install --target-branch main --charts ./charts/db-instances --upgrade helmfile destroy release: diff --git a/helmfile.yaml b/helmfile.yaml index b97fc6f..2ce7773 100644 --- a/helmfile.yaml +++ b/helmfile.yaml @@ -15,13 +15,16 @@ releases: - name: cert-manager chart: jetstack/cert-manager namespace: cert-manager + version: v1.16.1 createNamespace: true values: - - installCRDs: true + - crds: + enabled: true - name: postgres-instance namespace: databases chart: bitnami/postgresql + version: 16.0.6 values: - global: postgresql: @@ -31,6 +34,7 @@ releases: - name: mysql-instance namespace: databases chart: bitnami/mysql + version: 11.1.19 values: - auth: rootPassword: 123123!! @@ -38,10 +42,13 @@ releases: - name: prometheus-stack namespace: monitoring + version: 65.3.2 createNamespace: true disableValidation: true disableOpenAPIValidation: true chart: prometheus-community/kube-prometheus-stack + needs: + - cert-manager/cert-manager values: - prometheus: prometheusSpec: @@ -62,8 +69,9 @@ releases: - name: db-operator namespace: db-operator createNamespace: true - needs: - - cert-manager/cert-manager installed: {{ eq .Environment.Name "instances" | toYaml }} chart: ./charts/db-operator + needs: + - monitoring/prometheus-stack + - cert-manager/cert-manager