Skip to content

Commit

Permalink
feat: helm-chart appVersion bump and addtional fixes (#67)
Browse files Browse the repository at this point in the history
* fix: add string secret for consumers to allow keys to be generated
* fix: set service endpoint to applicationUrls without mediator suffix
* fix: restore cors configuration to mediation route
* ci: add helm-chart appVersion bump to release process
* ci: install yq to be used in release process
* chore: remove empty line

Signed-off-by: David Poltorak <david.poltorak@iohk.io>
Signed-off-by: davidpoltorak-io <109518299+davidpoltorak-io@users.noreply.github.com>

Signed-off-by: Shailesh Patil <shailesh.patil@iohk.io>
  • Loading branch information
davidpoltorak-io authored and mineme0110 committed May 1, 2024
1 parent ea80177 commit 539150b
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions infrastructure/charts/mediator/templates/apisixroute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ spec:
enable: true
config:
regex_uri: ["^/(.*)","/$1"]
{{ template "cors" . }}

---

Expand Down
2 changes: 1 addition & 1 deletion infrastructure/charts/mediator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
20 changes: 20 additions & 0 deletions infrastructure/charts/mediator/templates/stringsecret.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
{
Expand All @@ -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}"
}
Expand Down

0 comments on commit 539150b

Please sign in to comment.