diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index e5d7e377e8..70c6174d86 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -235,10 +235,21 @@ jobs: runtime_tag: dev-${{ needs.prepare_ci_run.outputs.DATETIME }} uses: ./.github/workflows/performance-test.yml - helm_charts_build: + helm_charts_publish: name: Publish helm chart changes to charts repo if: github.event_name == 'push' && needs.prepare_ci_run.outputs.NON_FORKED_AND_NON_ROBOT_RUN == 'true' needs: [prepare_ci_run, build_image] + strategy: + matrix: + config: + - name: keptn + path: chart + - name: keptn-lifecycle-operator + path: lifecycle-operator/chart + - name: keptn-metrics-operator + path: metrics-operator/chart + - name: keptn-cert-manager + path: klt-cert-manager/chart runs-on: ubuntu-22.04 steps: - name: Check out klt repo @@ -251,19 +262,19 @@ jobs: path: ./helm-charts-repository token: ${{ secrets.KEPTN_BOT_TOKEN }} - - name: Copy charts from klt to helm repo - run: rsync -av --delete --exclude='charts/*.tgz' ./helm/chart/ ./helm-charts-repository/charts/keptn-lifecycle-toolkit/ + - name: Copy chart from klt to helm repo + run: rsync -av --delete --exclude='charts/*.tgz' ./${{ matrix.config.path }}/ ./helm-charts-repository/charts/${{ matrix.config.name }}/ - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.KEPTN_BOT_TOKEN }} path: ./helm-charts-repository - commit-message: "feat: update KLT chart" + commit-message: "feat: update ${{ matrix.config.name }} helm chart" signoff: true - branch: klt-chart-update-${{ needs.prepare_ci_run.outputs.BRANCH_SLUG }} + branch: chart-update-${{ matrix.config.name }} delete-branch: true base: main - title: "Update KLT Helm chart" + title: "Update ${{ matrix.config.name }} Helm chart" body: | :robot: **This is an automated PR for updating and releasing Helm charts from keptn/lifecycle-toolkit!** :robot: diff --git a/.github/workflows/validate-helm-chart.yml b/.github/workflows/validate-helm-chart.yml index 2f47574537..844e903324 100644 --- a/.github/workflows/validate-helm-chart.yml +++ b/.github/workflows/validate-helm-chart.yml @@ -15,6 +15,17 @@ jobs: check-helm-docs: name: Check helm documentation values runs-on: ubuntu-22.04 + strategy: + matrix: + config: + - name: keptn + path: chart + - name: keptn-lifecycle-operator + path: lifecycle-operator/chart + - name: keptn-metrics-operator + path: metrics-operator/chart + - name: keptn-cert-manager + path: klt-cert-manager/chart steps: - name: Check out code uses: actions/checkout@v4 @@ -32,15 +43,14 @@ jobs: npm install --location=global ./ cd .. - - name: Check if Helm doc is up to date - ## TODO: test also other helm docs (metrics-operator, certificate-operator) + - name: Check if Helm doc is up to date for ${{ matrix.config.name }} run: | - cd ./lifecycle-operator/chart/ + cd ./${{ matrix.config.path }}/ cp ./README.md ./README-old.md cat ./values.yaml ./doc.yaml > ./rendered.yaml readme-generator --values=./rendered.yaml --readme=./README.md if ! cmp --quiet ./README-old.md ./README.md; then - echo "The Helm values have changes that are not reflected in the readme." + echo "The Helm values for ${{ matrix.config.name }} have changes that are not reflected in the readme." echo "Please use ./.github/scripts/generate-helm-docs.sh to re-generate the docs." echo "" echo "=========== Diff ===========" @@ -48,7 +58,7 @@ jobs: exit 1 else echo "" - echo "Helm values documentation is correct!" + echo "Helm values documentation for ${{ matrix.config.name }} is correct!" fi helm-tests: diff --git a/chart/doc.yaml b/chart/doc.yaml new file mode 100644 index 0000000000..f654802082 --- /dev/null +++ b/chart/doc.yaml @@ -0,0 +1,4 @@ +## @section Keptn +## @param certManager.enabled Enable this value to install Keptn Certificate Manager +## @param lifecycleOperator.enabled Enable this value to install Keptn Lifecycle Operator +## @param metricsOperator.enabled Enable this value to install Keptn Metrics Operator diff --git a/chart/values.yaml b/chart/values.yaml index cd45ebfb1c..237c8278fb 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -1,10 +1,6 @@ -## @section Keptn certManager: - ## @param certManager.enabled Enable this value to install Keptn Certificate Manager enabled: true lifecycleOperator: - ## @param lifecycleOperator.enabled Enable this value to install Keptn Lifecycle Operator enabled: true metricsOperator: - ## @param metricsOperator.enabled Enable this value to install Keptn Metrics Operator enabled: true