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 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" . }} --- 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 }}" 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 }} diff --git a/package.json b/package.json index ec43317a..2ce122d3 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,8 @@ "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}" }