-
Notifications
You must be signed in to change notification settings - Fork 0
Fixes and improvements for .NET, Spring Boot and Postgrest templates #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
917bf8f
eeba8db
7f837e9
6cb1c63
f6b8f1b
02e186d
1c1fab8
7fd9b97
6bdddb2
1c8e862
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,8 +3,12 @@ kind: Component | |||||
| metadata: | ||||||
| name: ${{ values.name }} | ||||||
| annotations: | ||||||
| backstage.io/techdocs-ref: dir:. | ||||||
| backstage.io/kubernetes-id: ${{ values.name }} | ||||||
| backstage.io/kubernetes-label-selector: app.kubernetes.io/name=${{ values.name }} | ||||||
| backstage.io/kubernetes-namespace: default | ||||||
|
||||||
| backstage.io/kubernetes-namespace: default | |
| backstage.io/kubernetes-namespace: ${{ values.namespace }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,7 +49,10 @@ spec: | |
| jwtSecret: | ||
| title: JWT Secret | ||
| type: string | ||
| description: Secret for signing JWT tokens (at least 32 chars recommended) | ||
| description: Secret for signing JWT tokens (32-64 characters required for PostgREST) | ||
| minLength: 32 | ||
| maxLength: 64 | ||
| ui:field: Secret | ||
| jwtRole: | ||
| title: JWT Role | ||
| type: string | ||
|
|
@@ -111,7 +114,7 @@ spec: | |
| description: "PostgREST API: ${{ parameters.name }}" | ||
| image: index.docker.io/${{ parameters.dockerOrg }}/${{ parameters.repoName }} | ||
| apiSchema: ${{ parameters.apiSchema }} | ||
| jwtSecret: ${{ parameters.jwtSecret }} | ||
| jwtSecret: ${{ secrets.jwtSecret }} | ||
| jwtRole: ${{ parameters.jwtRole }} | ||
|
Comment on lines
114
to
118
|
||
| anonRole: ${{ parameters.anonRole }} | ||
|
|
||
|
|
@@ -152,7 +155,7 @@ spec: | |
| databaseName: ${{ parameters.databaseConfig.dbName }} | ||
| databaseVersion: ${{ parameters.databaseConfig.version or '16' }} | ||
| apiSchema: ${{ parameters.apiSchema }} | ||
| jwtSecret: ${{ parameters.jwtSecret }} | ||
| jwtSecret: ${{ secrets.jwtSecret }} | ||
| jwtRole: ${{ parameters.jwtRole }} | ||
|
Comment on lines
156
to
159
|
||
| anonRole: ${{ parameters.anonRole }} | ||
| owner: ${{ user.entity.metadata.name or 'guest' }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,7 +46,10 @@ import ( | |
| apiVersion: "tekton.dev/v1beta1" | ||
| kind: "PipelineRun" | ||
| metadata: { | ||
| name: "\(_bp.appName)-migrate-$(uid)" | ||
| // Truncate appName to at most 32 chars to keep total name ≤63 chars. | ||
| // CUE slice [:n] panics if string is shorter than n, so we guard with a conditional. | ||
| let _namePrefix = [if len(_bp.appName) > 32 {_bp.appName[:32]}, _bp.appName][0] | ||
| name: "\(_namePrefix)-migrate-$(uid)" | ||
| namespace: _bp.namespace | ||
| labels: { | ||
| "helios.io/managed-by": "helios-operator" | ||
|
|
@@ -66,8 +69,8 @@ import ( | |
| params: [ | ||
| {name: "app-repo-url", value: "$(tt.params.git-repo-url)"}, | ||
| {name: "app-repo-revision", value: "$(tt.params.git-revision)"}, | ||
| {name: "db-secret-name", value: "api-db-secret"}, | ||
| {name: "migration-source", value: "db/migration"}, | ||
| {name: "db-secret-name", value: _bp.databaseSecretRef}, | ||
| {name: "migration-source", value: "db/migrations"}, | ||
| {name: "namespace", value: _bp.namespace}, | ||
| ] | ||
|
Comment on lines
69
to
75
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The IPv6 test case (and current
formatPostgresURIbehavior) producespostgres://...@::1:5432/..., which is not a valid URI because IPv6 hosts must be wrapped in brackets ([::1]). Consider updatingformatPostgresURIto bracket IPv6 literals and adjust this expectation accordingly.