Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
17a64a7
fix(orchestrator): fail DB creation job on actual errors instead of s…
Fortune-Ndlovu May 19, 2026
c4cd0dd
bump chart
Fortune-Ndlovu May 19, 2026
1dfe4b6
Merge branch 'main' into RHDHBUGS-2577-helm-orchestrator-db-creation-…
Fortune-Ndlovu May 19, 2026
2324873
update
Fortune-Ndlovu May 19, 2026
43dca16
bump chart version to 5.13.3
Fortune-Ndlovu May 19, 2026
ce31748
Add dbCreationJobBackoffLimit to both values.schema.json and values.s…
Fortune-Ndlovu May 19, 2026
d17d025
Update README and values.schema.json for Backstage chart version 5.13…
Fortune-Ndlovu May 19, 2026
202bbc6
qodo suggestions: Enhance dbCreationJobBackoffLimit in values.schema.…
Fortune-Ndlovu May 19, 2026
635fd18
add max and min values
Fortune-Ndlovu May 19, 2026
8f6b80f
connect to -d postgres the standard maintenance database that always …
Fortune-Ndlovu May 19, 2026
a8ad506
add Helm hook annotations to sonataflow DB creation Job
Fortune-Ndlovu May 19, 2026
7f81777
Merge branch 'main' into RHDHBUGS-2577-helm-orchestrator-db-creation-…
Fortune-Ndlovu May 19, 2026
642a980
Refactor sonataflow database Job name and add TTL for job completion
Fortune-Ndlovu May 19, 2026
6592206
Merge branch 'main' into RHDHBUGS-2577-helm-orchestrator-db-creation-…
Fortune-Ndlovu May 20, 2026
4f9e0a7
update
Fortune-Ndlovu May 20, 2026
c466cb9
keep job name create-sonataflow-database
Fortune-Ndlovu May 24, 2026
958b0ac
fix(orchestrator): add Helm hook annotations to DB creation Job for u…
Fortune-Ndlovu May 27, 2026
13b5e0f
Merge branch 'main' into RHDHBUGS-2577-helm-orchestrator-db-creation-…
Fortune-Ndlovu May 27, 2026
41fbb3e
fix(orchestrator): preserve failed DB creation Jobs for debugging
Fortune-Ndlovu May 27, 2026
333fd0c
cleanup
Fortune-Ndlovu May 27, 2026
9c3d496
refactor(orchestrator): use versioned Job name instead of Helm hooks
Fortune-Ndlovu May 28, 2026
56b08b4
Address rm3l's review feedback: shorten Job name to avoid long resour…
Fortune-Ndlovu May 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/backstage/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ sources: []
# Versions are expected to follow Semantic Versioning (https://semver.org/)
# Note that when this chart is published to https://github.com/openshift-helm-charts/charts
# it will follow the RHDH versioning 1.y.z
version: 5.14.0
version: 6.0.0
7 changes: 5 additions & 2 deletions charts/backstage/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# RHDH Backstage Helm Chart for OpenShift

![Version: 5.14.0](https://img.shields.io/badge/Version-5.14.0-informational?style=flat-square)
![Version: 6.0.0](https://img.shields.io/badge/Version-6.0.0-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A Helm chart for deploying Red Hat Developer Hub, which is a Red Hat supported version of Backstage.
Expand Down Expand Up @@ -29,7 +29,7 @@ For the **Generally Available** version of this chart, see:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add redhat-developer https://redhat-developer.github.io/rhdh-chart

helm install my-backstage redhat-developer/backstage --version 5.14.0
helm install my-backstage redhat-developer/backstage --version 6.0.0
```

## Introduction
Expand Down Expand Up @@ -211,6 +211,9 @@ Kubernetes: `>= 1.27.0-0`
| orchestrator.serverlessOperator.enabled | | bool | `true` |
| orchestrator.sonataflowPlatform.createDBJobImage | Image for the container used by the create-db job | string | `"{{ .Values.upstream.postgresql.image.registry }}/{{ .Values.upstream.postgresql.image.repository }}:{{ .Values.upstream.postgresql.image.tag }}"` |
| orchestrator.sonataflowPlatform.dataIndexImage | Image for the container used by the sonataflow data index, optional and used for disconnected environments | string | `""` |
| orchestrator.sonataflowPlatform.dbCreationJobActiveDeadlineSeconds | Maximum time in seconds for the create-db Job to complete before being terminated | int | `120` |
| orchestrator.sonataflowPlatform.dbCreationJobBackoffLimit | Number of retries for the create-db job if it fails | int | `2` |
| orchestrator.sonataflowPlatform.dbCreationJobTTLSecondsAfterFinished | Time in seconds after which a finished create-db Job is automatically deleted | int | `300` |
| orchestrator.sonataflowPlatform.eventing.broker.name | | string | `""` |
| orchestrator.sonataflowPlatform.eventing.broker.namespace | | string | `""` |
| orchestrator.sonataflowPlatform.externalDBHost | Host for the user-configured external Database | string | `""` |
Expand Down
27 changes: 22 additions & 5 deletions charts/backstage/templates/sonataflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ spec:
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Release.Name }}-create-sonataflow-database
name: {{ .Release.Name }}-create-sf-db-{{ .Chart.Version | replace "." "-" }}
namespace: {{ .Release.Namespace }}
spec:
activeDeadlineSeconds: 120
ttlSecondsAfterFinished: {{ .Values.orchestrator.sonataflowPlatform.dbCreationJobTTLSecondsAfterFinished }}
activeDeadlineSeconds: {{ .Values.orchestrator.sonataflowPlatform.dbCreationJobActiveDeadlineSeconds }}
template:
spec:
initContainers:
Expand Down Expand Up @@ -186,11 +187,27 @@ spec:
command: [ "sh", "-c" ]
{{- if .Values.upstream.postgresql.enabled }}
args:
- "psql -h {{ .Release.Name }}-postgresql{{- if eq .Values.upstream.postgresql.architecture "replication" }}-primary{{- end }} -p 5432 -U postgres -c 'CREATE DATABASE sonataflow;' || echo WARNING: Could not create database"
- |
psql -h {{ .Release.Name }}-postgresql{{- if eq .Values.upstream.postgresql.architecture "replication" }}-primary{{- end }} -p 5432 -U postgres -c 'CREATE DATABASE sonataflow;' 2>&1 || {
if psql -h {{ .Release.Name }}-postgresql{{- if eq .Values.upstream.postgresql.architecture "replication" }}-primary{{- end }} -p 5432 -U postgres -tc "SELECT 1 FROM pg_database WHERE datname='sonataflow'" | grep -q 1; then
echo "Database 'sonataflow' already exists, skipping creation."
else
echo "ERROR: Failed to create database 'sonataflow'."
exit 1
fi
}
{{- else }}
args:
- "psql -h ${POSTGRES_HOST} -p ${POSTGRES_PORT} -U ${POSTGRES_USER} -d {{ .Values.orchestrator.sonataflowPlatform.externalDBName }} -c 'CREATE DATABASE sonataflow;' || echo WARNING: Could not create database"
- |
psql -h ${POSTGRES_HOST} -p ${POSTGRES_PORT} -U ${POSTGRES_USER} -d {{ .Values.orchestrator.sonataflowPlatform.externalDBName }} -c 'CREATE DATABASE sonataflow;' 2>&1 || {
if psql -h ${POSTGRES_HOST} -p ${POSTGRES_PORT} -U ${POSTGRES_USER} -d {{ .Values.orchestrator.sonataflowPlatform.externalDBName }} -tc "SELECT 1 FROM pg_database WHERE datname='sonataflow'" | grep -q 1; then
echo "Database 'sonataflow' already exists, skipping creation."
else
echo "ERROR: Failed to create database 'sonataflow'."
exit 1
fi
}
{{- end }}
restartPolicy: Never
backoffLimit: 2
backoffLimit: {{ .Values.orchestrator.sonataflowPlatform.dbCreationJobBackoffLimit }}
{{- end }}
19 changes: 19 additions & 0 deletions charts/backstage/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,25 @@
"title": "Image for the container used by the sonataflow data index",
"type": "string"
},
"dbCreationJobActiveDeadlineSeconds": {
"default": 120,
"minimum": 1,
"title": "Maximum time in seconds for the create-db Job to complete before being terminated",
"type": "integer"
},
"dbCreationJobBackoffLimit": {
"default": 2,
"maximum": 10,
"minimum": 0,
"title": "Number of retries for the create-db job if it fails",
"type": "integer"
},
"dbCreationJobTTLSecondsAfterFinished": {
"default": 300,
"minimum": 0,
"title": "Time in seconds after which a finished create-db Job is automatically deleted",
"type": "integer"
},
"eventing": {
"additionalProperties": false,
"properties": {
Expand Down
19 changes: 19 additions & 0 deletions charts/backstage/values.schema.tmpl.json
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,25 @@
"type": "string",
"additionalProperties": false
},
"dbCreationJobBackoffLimit": {
"default": 2,
"maximum": 10,
"minimum": 0,
"title": "Number of retries for the create-db job if it fails",
"type": "integer"
},
"dbCreationJobTTLSecondsAfterFinished": {
"default": 300,
"minimum": 0,
"title": "Time in seconds after which a finished create-db Job is automatically deleted",
"type": "integer"
},
"dbCreationJobActiveDeadlineSeconds": {
"default": 120,
"minimum": 1,
"title": "Maximum time in seconds for the create-db Job to complete before being terminated",
"type": "integer"
},
"jobServiceImage": {
"title": "Image for the container used by the sonataflow jobs service",
"type": "string",
Expand Down
6 changes: 6 additions & 0 deletions charts/backstage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,12 @@ orchestrator:
initContainerImage: "{{ .Values.upstream.postgresql.image.registry }}/{{ .Values.upstream.postgresql.image.repository }}:{{ .Values.upstream.postgresql.image.tag }}"
# -- Image for the container used by the create-db job
createDBJobImage: "{{ .Values.upstream.postgresql.image.registry }}/{{ .Values.upstream.postgresql.image.repository }}:{{ .Values.upstream.postgresql.image.tag }}"
# -- Number of retries for the create-db job if it fails
dbCreationJobBackoffLimit: 2
# -- Time in seconds after which a finished create-db Job is automatically deleted
dbCreationJobTTLSecondsAfterFinished: 300
# -- Maximum time in seconds for the create-db Job to complete before being terminated
dbCreationJobActiveDeadlineSeconds: 120
# -- Image for the container used by the sonataflow jobs service, optional and used for disconnected environments
jobServiceImage: ""
# -- Image for the container used by the sonataflow data index, optional and used for disconnected environments
Expand Down
Loading