From f17780e4a452b4df2fd427c67f04ce6646cee56d Mon Sep 17 00:00:00 2001 From: Aron Kaufmann <100943793+AronKa-SAG@users.noreply.github.com> Date: Tue, 25 Jun 2024 07:36:22 +0200 Subject: [PATCH 1/3] feat(commons): add possibility to set roleBindingName (#97) * increased chart version commons * add roleBindingName in commons --- common/helm/Chart.yaml | 2 +- common/helm/templates/_names.tpl | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/common/helm/Chart.yaml b/common/helm/Chart.yaml index 55ffd77..df3f690 100644 --- a/common/helm/Chart.yaml +++ b/common/helm/Chart.yaml @@ -38,4 +38,4 @@ name: common sources: - https://github.com/softwareag/webmethods-helm-charts type: library -version: 1.0.2 \ No newline at end of file +version: 1.0.3 \ No newline at end of file diff --git a/common/helm/templates/_names.tpl b/common/helm/templates/_names.tpl index 1d244b6..c6ee9fd 100644 --- a/common/helm/templates/_names.tpl +++ b/common/helm/templates/_names.tpl @@ -84,4 +84,15 @@ Create the name of the role to use {{- else }} {{- default "default" .Values.serviceAccount.roleName }} {{- end }} +{{- end }} + +{{/* +Create the name of the rolebinding to use +*/}} +{{- define "common.names.roleBindingName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "common.names.fullname" .) .Values.serviceAccount.roleBindingName }} +{{- else }} +{{- default "default" .Values.serviceAccount.roleBindingName }} +{{- end }} {{- end }} \ No newline at end of file From 0b10620c0d7372690c86c6de185c91fc68cc8377 Mon Sep 17 00:00:00 2001 From: thr Date: Tue, 25 Jun 2024 15:14:53 +0200 Subject: [PATCH 2/3] remove README Documentation + helm dependencies update for each Helm Chart --- .github/workflows/dry-run-test.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/dry-run-test.yml b/.github/workflows/dry-run-test.yml index 064fd04..cc62881 100644 --- a/.github/workflows/dry-run-test.yml +++ b/.github/workflows/dry-run-test.yml @@ -20,14 +20,6 @@ jobs: with: fetch-depth: 0 - - name: Generate Helm README Documentation with jnorwood - run: | - sudo docker run --rm --volume "$(pwd):/helm-docs" -u $(id -u) jnorwood/helm-docs:latest - - - name: Remove README.md template files - run: | - find . -name "README.md.gotmpl" | xargs rm - - name: Install Helm run: | curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 @@ -36,24 +28,30 @@ jobs: - name: Dry-run of apigateway run: | - helm template apigw apigateway/helm + helm dependencies update apigateway/helm + helm template apigw apigateway/helm - name: Dry-run of developerportal run: | - helm template devportal developerportal/helm + helm dependencies update developerportal/helm + helm template devportal developerportal/helm - name: Dry-run of microservicesruntime run: | - helm template msr microservicesruntime/helm + helm dependencies update microservicesruntime/helm + helm template msr microservicesruntime/helm - name: Dry-run of mywebmethodsserver run: | - helm template mws mywebmethodsserver/helm + helm dependencies update mywebmethodsserver/helm + helm template mws mywebmethodsserver/helm - name: Dry-run of universalmessaging run: | - helm template um universalmessaging/helm + helm dependencies update universalmessaging/helm + helm template um universalmessaging/helm - name: Dry-run of terracottabigmemorymax run: | - helm template um terracottabigmemorymax/helm + helm dependencies update terracottabigmemorymax/helm + helm template tc terracottabigmemorymax/helm From 9c47387774a4d2e4ef043d4ab749c83eeaff93a0 Mon Sep 17 00:00:00 2001 From: thr Date: Tue, 25 Jun 2024 15:22:04 +0200 Subject: [PATCH 3/3] pass commit message through environment variable --- .github/workflows/gen-readme-values.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gen-readme-values.yml b/.github/workflows/gen-readme-values.yml index 1a07f4b..1f750a3 100644 --- a/.github/workflows/gen-readme-values.yml +++ b/.github/workflows/gen-readme-values.yml @@ -36,9 +36,11 @@ jobs: sudo docker run --rm --volume "$(pwd):/helm-docs" -u $(id -u) jnorwood/helm-docs:latest - name: Push new generated README + env: + CMT_MSG: ${{ github.event.head_commit.message }} run: | cd webmethods-helm-charts/ git add . - git commit -am "${{ github.event.head_commit.message }} and updating helm/README.me from values.yaml" + git commit -am "$CMT_MSG and updating helm/README.me from values.yaml" git branch -M ${{ github.ref_name }} git push -f origin ${{ github.ref_name }}