From 630a72e82e25425ee7f7630501b5c66269034e48 Mon Sep 17 00:00:00 2001 From: David Poltorak Date: Tue, 25 Jul 2023 15:33:02 +0100 Subject: [PATCH 1/6] fix: add string secret for consumers to allow keys to be generated Signed-off-by: David Poltorak --- .../mediator/templates/stringsecret.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 infrastructure/charts/mediator/templates/stringsecret.yaml diff --git a/infrastructure/charts/mediator/templates/stringsecret.yaml b/infrastructure/charts/mediator/templates/stringsecret.yaml new file mode 100644 index 00000000..46124886 --- /dev/null +++ b/infrastructure/charts/mediator/templates/stringsecret.yaml @@ -0,0 +1,20 @@ +{{- if .Values.ingress.enabled }} +{{- $root := . -}} +{{- range $consumer := .Values.ingress.consumers }} +apiVersion: "secretgenerator.mittwald.de/v1alpha1" +kind: StringSecret +metadata: + name: "{{ $root.Release.Namespace }}-{{ $consumer | lower }}" + namespace: {{ $root.Release.Namespace }} + labels: + {{ template "labels.common" . }} +spec: + forceRegenerate: false + data: + username: {{ $consumer | lower }} + fields: + - fieldName: "key" + encoding: "base64" + length: "32" +{{- end }} +{{- end }} From bfa7634ec02ee7407a431aef9b88b394194b4d49 Mon Sep 17 00:00:00 2001 From: David Poltorak Date: Wed, 26 Jul 2023 12:43:50 +0100 Subject: [PATCH 2/6] fix: set service endpoint to applicationUrls without mediator suffix Signed-off-by: David Poltorak --- infrastructure/charts/mediator/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/charts/mediator/templates/deployment.yaml b/infrastructure/charts/mediator/templates/deployment.yaml index c139df3e..f9e4e59c 100644 --- a/infrastructure/charts/mediator/templates/deployment.yaml +++ b/infrastructure/charts/mediator/templates/deployment.yaml @@ -40,4 +40,4 @@ spec: - name: MONGODB_DB_NAME value: "mediator" - name: SERVICE_ENDPOINT - value: "https://{{ index .Values.ingress.applicationUrls 0 }}/mediator" + value: "https://{{ index .Values.ingress.applicationUrls 0 }}" From 9629d3df2004b17944cb0a2f656131f198a03a0c Mon Sep 17 00:00:00 2001 From: David Poltorak Date: Wed, 26 Jul 2023 15:58:27 +0100 Subject: [PATCH 3/6] fix: restore cors configuration to mediation route Signed-off-by: David Poltorak --- infrastructure/charts/mediator/templates/apisixroute.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/infrastructure/charts/mediator/templates/apisixroute.yaml b/infrastructure/charts/mediator/templates/apisixroute.yaml index 0985f987..7c267d66 100644 --- a/infrastructure/charts/mediator/templates/apisixroute.yaml +++ b/infrastructure/charts/mediator/templates/apisixroute.yaml @@ -24,6 +24,7 @@ spec: enable: true config: regex_uri: ["^/(.*)","/$1"] + {{ template "cors" . }} --- From 01253efe17b7e09806e86834180719b9b270226a Mon Sep 17 00:00:00 2001 From: David Poltorak Date: Thu, 27 Jul 2023 10:29:17 +0100 Subject: [PATCH 4/6] ci: add helm-chart appVersion bump to release process Signed-off-by: David Poltorak --- package.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ec43317a..8c46690a 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,12 @@ "prepareCmd": "NODE_OPTIONS=--openssl-legacy-provider sbt -mem 2048 -J-Xmx5120m \"release release-version ${nextRelease.version} next-version ${nextRelease.version}-SNAPSHOT with-defaults\"" } ], + [ + "@semantic-release/exec", + { + "prepareCmd": "yq -i '.appVersion = \"${nextRelease.version}\"' ./infrastructure/charts/mediator/Chart.yaml" + } + ], [ "@semantic-release/exec", { @@ -63,7 +69,9 @@ "version.sbt", "CHANGELOG.md", "package.json", - "package-lock.json" + "package-lock.json", + "infrastructure/charts/mediator/Chart.yaml" + ], "message": "chore(release): cut prism mediator ${nextRelease.version} release\n\n${nextRelease.notes}" } From 356a65017b5eca6f2af44198caad4c3044d754a1 Mon Sep 17 00:00:00 2001 From: David Poltorak Date: Thu, 27 Jul 2023 11:25:38 +0100 Subject: [PATCH 5/6] ci: install yq to be used in release process Signed-off-by: David Poltorak --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb82633c..0688a883 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,6 +38,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: "lts/*" + - name: Setup yq - portable yaml processor + uses: mikefarah/yq@v4.34.2 - name: Setup Scala.JS uses: japgolly/setup-scalajs@v1 - name: Cache sbt From eb565de112b24a2c103e60564a49bca0f6d623cd Mon Sep 17 00:00:00 2001 From: David Poltorak Date: Thu, 27 Jul 2023 11:26:14 +0100 Subject: [PATCH 6/6] chore: remove empty line Signed-off-by: David Poltorak --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 8c46690a..2ce122d3 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,6 @@ "package.json", "package-lock.json", "infrastructure/charts/mediator/Chart.yaml" - ], "message": "chore(release): cut prism mediator ${nextRelease.version} release\n\n${nextRelease.notes}" }