From 04c02211b56cfc4d3c1c9f5471c63cb5cc020f22 Mon Sep 17 00:00:00 2001 From: Olha Yevtushenko Date: Wed, 4 Oct 2023 16:05:40 +0300 Subject: [PATCH 1/5] helm: move chart to sub-folder --- charts/ct.yaml | 2 +- charts/{ => k6-operator}/Chart.yaml | 0 charts/{ => k6-operator}/README.md | 0 charts/{ => k6-operator}/README.md.gotmpl | 0 .../{ => k6-operator}/samples/customAnnotationsAndLabels.yaml | 0 charts/{ => k6-operator}/templates/NOTES.txt | 0 charts/{ => k6-operator}/templates/_helpers.tpl | 0 charts/{ => k6-operator}/templates/clusterRole.yaml | 0 charts/{ => k6-operator}/templates/clusterRoleBinding.yaml | 0 charts/{ => k6-operator}/templates/crds/k6.yaml | 0 charts/{ => k6-operator}/templates/crds/plz.yaml | 0 charts/{ => k6-operator}/templates/crds/testrun.yaml | 0 charts/{ => k6-operator}/templates/deployment.yaml | 0 charts/{ => k6-operator}/templates/namespace.yaml | 0 .../{ => k6-operator}/templates/prometheus/serviceMonitor.yaml | 0 charts/{ => k6-operator}/templates/role.yaml | 0 charts/{ => k6-operator}/templates/roleBinding.yaml | 0 charts/{ => k6-operator}/templates/service.yaml | 0 charts/{ => k6-operator}/templates/serviceAccount.yaml | 0 charts/{ => k6-operator}/values.yaml | 0 20 files changed, 1 insertion(+), 1 deletion(-) rename charts/{ => k6-operator}/Chart.yaml (100%) rename charts/{ => k6-operator}/README.md (100%) rename charts/{ => k6-operator}/README.md.gotmpl (100%) rename charts/{ => k6-operator}/samples/customAnnotationsAndLabels.yaml (100%) rename charts/{ => k6-operator}/templates/NOTES.txt (100%) rename charts/{ => k6-operator}/templates/_helpers.tpl (100%) rename charts/{ => k6-operator}/templates/clusterRole.yaml (100%) rename charts/{ => k6-operator}/templates/clusterRoleBinding.yaml (100%) rename charts/{ => k6-operator}/templates/crds/k6.yaml (100%) rename charts/{ => k6-operator}/templates/crds/plz.yaml (100%) rename charts/{ => k6-operator}/templates/crds/testrun.yaml (100%) rename charts/{ => k6-operator}/templates/deployment.yaml (100%) rename charts/{ => k6-operator}/templates/namespace.yaml (100%) rename charts/{ => k6-operator}/templates/prometheus/serviceMonitor.yaml (100%) rename charts/{ => k6-operator}/templates/role.yaml (100%) rename charts/{ => k6-operator}/templates/roleBinding.yaml (100%) rename charts/{ => k6-operator}/templates/service.yaml (100%) rename charts/{ => k6-operator}/templates/serviceAccount.yaml (100%) rename charts/{ => k6-operator}/values.yaml (100%) diff --git a/charts/ct.yaml b/charts/ct.yaml index 683f3beb..335cbd7e 100644 --- a/charts/ct.yaml +++ b/charts/ct.yaml @@ -2,7 +2,7 @@ remote: origin target-branch: main chart-dirs: - - charts + - charts/k6-operator chart-repos: - grafana=https://grafana.github.io/helm-charts helm-extra-args: --timeout 600s diff --git a/charts/Chart.yaml b/charts/k6-operator/Chart.yaml similarity index 100% rename from charts/Chart.yaml rename to charts/k6-operator/Chart.yaml diff --git a/charts/README.md b/charts/k6-operator/README.md similarity index 100% rename from charts/README.md rename to charts/k6-operator/README.md diff --git a/charts/README.md.gotmpl b/charts/k6-operator/README.md.gotmpl similarity index 100% rename from charts/README.md.gotmpl rename to charts/k6-operator/README.md.gotmpl diff --git a/charts/samples/customAnnotationsAndLabels.yaml b/charts/k6-operator/samples/customAnnotationsAndLabels.yaml similarity index 100% rename from charts/samples/customAnnotationsAndLabels.yaml rename to charts/k6-operator/samples/customAnnotationsAndLabels.yaml diff --git a/charts/templates/NOTES.txt b/charts/k6-operator/templates/NOTES.txt similarity index 100% rename from charts/templates/NOTES.txt rename to charts/k6-operator/templates/NOTES.txt diff --git a/charts/templates/_helpers.tpl b/charts/k6-operator/templates/_helpers.tpl similarity index 100% rename from charts/templates/_helpers.tpl rename to charts/k6-operator/templates/_helpers.tpl diff --git a/charts/templates/clusterRole.yaml b/charts/k6-operator/templates/clusterRole.yaml similarity index 100% rename from charts/templates/clusterRole.yaml rename to charts/k6-operator/templates/clusterRole.yaml diff --git a/charts/templates/clusterRoleBinding.yaml b/charts/k6-operator/templates/clusterRoleBinding.yaml similarity index 100% rename from charts/templates/clusterRoleBinding.yaml rename to charts/k6-operator/templates/clusterRoleBinding.yaml diff --git a/charts/templates/crds/k6.yaml b/charts/k6-operator/templates/crds/k6.yaml similarity index 100% rename from charts/templates/crds/k6.yaml rename to charts/k6-operator/templates/crds/k6.yaml diff --git a/charts/templates/crds/plz.yaml b/charts/k6-operator/templates/crds/plz.yaml similarity index 100% rename from charts/templates/crds/plz.yaml rename to charts/k6-operator/templates/crds/plz.yaml diff --git a/charts/templates/crds/testrun.yaml b/charts/k6-operator/templates/crds/testrun.yaml similarity index 100% rename from charts/templates/crds/testrun.yaml rename to charts/k6-operator/templates/crds/testrun.yaml diff --git a/charts/templates/deployment.yaml b/charts/k6-operator/templates/deployment.yaml similarity index 100% rename from charts/templates/deployment.yaml rename to charts/k6-operator/templates/deployment.yaml diff --git a/charts/templates/namespace.yaml b/charts/k6-operator/templates/namespace.yaml similarity index 100% rename from charts/templates/namespace.yaml rename to charts/k6-operator/templates/namespace.yaml diff --git a/charts/templates/prometheus/serviceMonitor.yaml b/charts/k6-operator/templates/prometheus/serviceMonitor.yaml similarity index 100% rename from charts/templates/prometheus/serviceMonitor.yaml rename to charts/k6-operator/templates/prometheus/serviceMonitor.yaml diff --git a/charts/templates/role.yaml b/charts/k6-operator/templates/role.yaml similarity index 100% rename from charts/templates/role.yaml rename to charts/k6-operator/templates/role.yaml diff --git a/charts/templates/roleBinding.yaml b/charts/k6-operator/templates/roleBinding.yaml similarity index 100% rename from charts/templates/roleBinding.yaml rename to charts/k6-operator/templates/roleBinding.yaml diff --git a/charts/templates/service.yaml b/charts/k6-operator/templates/service.yaml similarity index 100% rename from charts/templates/service.yaml rename to charts/k6-operator/templates/service.yaml diff --git a/charts/templates/serviceAccount.yaml b/charts/k6-operator/templates/serviceAccount.yaml similarity index 100% rename from charts/templates/serviceAccount.yaml rename to charts/k6-operator/templates/serviceAccount.yaml diff --git a/charts/values.yaml b/charts/k6-operator/values.yaml similarity index 100% rename from charts/values.yaml rename to charts/k6-operator/values.yaml From 096d9f6c6f93f4f22ba1325c87069fb7b5040580 Mon Sep 17 00:00:00 2001 From: Olha Yevtushenko Date: Wed, 4 Oct 2023 16:08:55 +0300 Subject: [PATCH 2/5] ci: add ct.yaml to helm lint and test --- .github/workflows/helm-lint.yaml | 2 +- .github/workflows/helm-test.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/helm-lint.yaml b/.github/workflows/helm-lint.yaml index 6b2d6fb3..99773dd6 100644 --- a/.github/workflows/helm-lint.yaml +++ b/.github/workflows/helm-lint.yaml @@ -23,4 +23,4 @@ jobs: uses: helm/chart-testing-action@v2.2.0 - name: Run chart-testing (lint) - run: ct lint --target-branch ${{ github.ref_name }} --charts ./charts/ + run: ct lint --target-branch ${{ github.ref_name }} --config ./charts/ct.yaml diff --git a/.github/workflows/helm-test.yaml b/.github/workflows/helm-test.yaml index 389d6550..7f1138bb 100644 --- a/.github/workflows/helm-test.yaml +++ b/.github/workflows/helm-test.yaml @@ -30,7 +30,7 @@ jobs: - name: Run chart-testing (list-changed) id: list-changed run: | - changed=$(ct list-changed --target-branch ${{ github.ref_name }}) + changed=$(ct list-changed --config ./charts/ct.yaml --target-branch ${{ github.ref_name }}) if [[ -n "$changed" ]]; then echo "changed=true" >> $GITHUB_OUTPUT fi From e371b3276db2e94e3424a3de8542d4b32bb3858d Mon Sep 17 00:00:00 2001 From: Olha Yevtushenko Date: Wed, 4 Oct 2023 16:32:24 +0300 Subject: [PATCH 3/5] helm: ct wants a subdirectory --- charts/ct.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/ct.yaml b/charts/ct.yaml index 335cbd7e..683f3beb 100644 --- a/charts/ct.yaml +++ b/charts/ct.yaml @@ -2,7 +2,7 @@ remote: origin target-branch: main chart-dirs: - - charts/k6-operator + - charts chart-repos: - grafana=https://grafana.github.io/helm-charts helm-extra-args: --timeout 600s From 12f78b30471418136396ca94f41cf842047c48ed Mon Sep 17 00:00:00 2001 From: Olha Yevtushenko Date: Fri, 6 Oct 2023 18:38:51 +0300 Subject: [PATCH 4/5] ci: update token for helm releases --- .github/workflows/helm-release.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml index b0f3b593..f6886801 100644 --- a/.github/workflows/helm-release.yaml +++ b/.github/workflows/helm-release.yaml @@ -13,11 +13,12 @@ jobs: call-update-helm-repo: permissions: contents: write - uses: grafana/helm-charts/.github/workflows/update-helm-repo.yaml@main + uses: grafana/helm-charts/.github/workflows/update-helm-repo.yaml@ci/fix-for-github-apps-jwt with: charts_dir: charts cr_configfile: charts/cr.yaml ct_configfile: charts/ct.yaml helm_tag_prefix: helm secrets: - helm_repo_token: ${{ secrets.GITHUB_TOKEN }} + gihub_app_id: ${{ secrets.K6_OPERATOR_HELM_RELEASE_APP_ID }} + helm_repo_token: ${{ secrets.K6_OPERATOR_HELM_RELEASE_PEM_KEY }} From 862d82520c6cdab59d64d72da9da8796890ae6a2 Mon Sep 17 00:00:00 2001 From: Olha Yevtushenko Date: Fri, 20 Oct 2023 12:45:53 +0300 Subject: [PATCH 5/5] Helm: bump to 1.1.0 and 0.0.11 --- .github/workflows/helm-release.yaml | 2 +- charts/k6-operator/Chart.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml index f6886801..b7c1ab7d 100644 --- a/.github/workflows/helm-release.yaml +++ b/.github/workflows/helm-release.yaml @@ -7,7 +7,7 @@ on: branches: - main paths: - - 'charts/Chart.yaml' + - 'charts/k6-operator/Chart.yaml' jobs: call-update-helm-repo: diff --git a/charts/k6-operator/Chart.yaml b/charts/k6-operator/Chart.yaml index 4ba418a5..1d1fddb7 100644 --- a/charts/k6-operator/Chart.yaml +++ b/charts/k6-operator/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 -appVersion: "0.0.10" +appVersion: "0.0.11" description: A Helm chart to install the k6-operator name: k6-operator -version: 1.0.0 +version: 1.1.0 kubeVersion: ">=1.16.0-0" home: https://k6.io sources: