From 3121b12266f9be1588a39181c552121c803c54c0 Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Fri, 29 May 2026 17:13:14 +0200 Subject: [PATCH 1/3] fix(orchestrator): make ttlSecondsAfterFinished optional to prevent GitOps reconciliation loops When managed by ArgoCD or similar reconcilers, the TTL controller deletes the finished Job, causing drift detection and an infinite recreate-rerun cycle. Default to nil (omit the field) so the Job stays inert after completion; users who want auto-cleanup can explicitly set dbCreationJobTTLSecondsAfterFinished to a positive value. Assisted-by: Claude --- charts/backstage/Chart.yaml | 2 +- charts/backstage/README.md | 10 +++++----- charts/backstage/templates/sonataflows.yaml | 4 +++- charts/backstage/values.schema.json | 10 ++++++---- charts/backstage/values.schema.tmpl.json | 7 +++---- charts/backstage/values.yaml | 8 ++++---- 6 files changed, 22 insertions(+), 19 deletions(-) diff --git a/charts/backstage/Chart.yaml b/charts/backstage/Chart.yaml index 9ebd837a..cfdc7051 100644 --- a/charts/backstage/Chart.yaml +++ b/charts/backstage/Chart.yaml @@ -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: 6.0.0 +version: 6.0.1 diff --git a/charts/backstage/README.md b/charts/backstage/README.md index 49e20ef2..6aa323ff 100644 --- a/charts/backstage/README.md +++ b/charts/backstage/README.md @@ -1,7 +1,7 @@ # RHDH Backstage Helm Chart for OpenShift -![Version: 6.0.0](https://img.shields.io/badge/Version-6.0.0-informational?style=flat-square) +![Version: 6.0.1](https://img.shields.io/badge/Version-6.0.1-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. @@ -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 6.0.0 +helm install my-backstage redhat-developer/backstage --version 6.0.1 ``` ## Introduction @@ -211,9 +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.dbCreationJobActiveDeadlineSeconds | Maximum time in seconds for the Sonataflow database creation Job to complete before being terminated | int | `120` | +| orchestrator.sonataflowPlatform.dbCreationJobBackoffLimit | Number of retries for the Sonataflow database creation job if it fails | int | `2` | +| orchestrator.sonataflowPlatform.dbCreationJobTTLSecondsAfterFinished | Time in seconds after which the Sonataflow database creation Job is automatically deleted. Leave empty to disable (recommended for GitOps/ArgoCD) | int | `nil` | | orchestrator.sonataflowPlatform.eventing.broker.name | | string | `""` | | orchestrator.sonataflowPlatform.eventing.broker.namespace | | string | `""` | | orchestrator.sonataflowPlatform.externalDBHost | Host for the user-configured external Database | string | `""` | diff --git a/charts/backstage/templates/sonataflows.yaml b/charts/backstage/templates/sonataflows.yaml index d76b7c8a..a4d578ee 100644 --- a/charts/backstage/templates/sonataflows.yaml +++ b/charts/backstage/templates/sonataflows.yaml @@ -88,7 +88,9 @@ metadata: name: {{ .Release.Name }}-create-sf-db-{{ .Chart.Version | replace "." "-" }} namespace: {{ .Release.Namespace }} spec: - ttlSecondsAfterFinished: {{ .Values.orchestrator.sonataflowPlatform.dbCreationJobTTLSecondsAfterFinished }} +{{- with .Values.orchestrator.sonataflowPlatform.dbCreationJobTTLSecondsAfterFinished }} + ttlSecondsAfterFinished: {{ . }} +{{- end }} activeDeadlineSeconds: {{ .Values.orchestrator.sonataflowPlatform.dbCreationJobActiveDeadlineSeconds }} template: spec: diff --git a/charts/backstage/values.schema.json b/charts/backstage/values.schema.json index 94a2d6ad..ba991da8 100644 --- a/charts/backstage/values.schema.json +++ b/charts/backstage/values.schema.json @@ -489,10 +489,12 @@ "type": "integer" }, "dbCreationJobTTLSecondsAfterFinished": { - "default": 300, - "minimum": 0, - "title": "Time in seconds after which a finished create-db Job is automatically deleted", - "type": "integer" + "minimum": 1, + "title": "Time in seconds after which a finished create-db Job is automatically deleted. Leave empty to disable (recommended for GitOps/ArgoCD)", + "type": [ + "integer", + "null" + ] }, "eventing": { "additionalProperties": false, diff --git a/charts/backstage/values.schema.tmpl.json b/charts/backstage/values.schema.tmpl.json index d47fdf80..5eca1177 100644 --- a/charts/backstage/values.schema.tmpl.json +++ b/charts/backstage/values.schema.tmpl.json @@ -576,10 +576,9 @@ "type": "integer" }, "dbCreationJobTTLSecondsAfterFinished": { - "default": 300, - "minimum": 0, - "title": "Time in seconds after which a finished create-db Job is automatically deleted", - "type": "integer" + "minimum": 1, + "title": "Time in seconds after which a finished create-db Job is automatically deleted. Leave empty to disable (recommended for GitOps/ArgoCD)", + "type": ["integer", "null"] }, "dbCreationJobActiveDeadlineSeconds": { "default": 120, diff --git a/charts/backstage/values.yaml b/charts/backstage/values.yaml index 0be42f06..a903494b 100644 --- a/charts/backstage/values.yaml +++ b/charts/backstage/values.yaml @@ -533,11 +533,11 @@ 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 + # -- Number of retries for the Sonataflow database creation 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 + # -- (int) Time in seconds after which the Sonataflow database creation Job is automatically deleted. Leave empty to disable (recommended for GitOps/ArgoCD) + dbCreationJobTTLSecondsAfterFinished: + # -- Maximum time in seconds for the Sonataflow database creation 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: "" From 323e8bdc96c7332f37d4cebbaea97d179a547f99 Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Fri, 29 May 2026 17:21:30 +0200 Subject: [PATCH 2/3] fix(orchestrator): align dbCreationJob field titles in schema template with values.yaml Assisted-by: Claude --- charts/backstage/values.schema.json | 6 +++--- charts/backstage/values.schema.tmpl.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/backstage/values.schema.json b/charts/backstage/values.schema.json index ba991da8..3ba5af69 100644 --- a/charts/backstage/values.schema.json +++ b/charts/backstage/values.schema.json @@ -478,19 +478,19 @@ "dbCreationJobActiveDeadlineSeconds": { "default": 120, "minimum": 1, - "title": "Maximum time in seconds for the create-db Job to complete before being terminated", + "title": "Maximum time in seconds for the Sonataflow database creation 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", + "title": "Number of retries for the Sonataflow database creation job if it fails", "type": "integer" }, "dbCreationJobTTLSecondsAfterFinished": { "minimum": 1, - "title": "Time in seconds after which a finished create-db Job is automatically deleted. Leave empty to disable (recommended for GitOps/ArgoCD)", + "title": "Time in seconds after which the Sonataflow database creation Job is automatically deleted. Leave empty to disable (recommended for GitOps/ArgoCD)", "type": [ "integer", "null" diff --git a/charts/backstage/values.schema.tmpl.json b/charts/backstage/values.schema.tmpl.json index 5eca1177..2801d5ce 100644 --- a/charts/backstage/values.schema.tmpl.json +++ b/charts/backstage/values.schema.tmpl.json @@ -572,18 +572,18 @@ "default": 2, "maximum": 10, "minimum": 0, - "title": "Number of retries for the create-db job if it fails", + "title": "Number of retries for the Sonataflow database creation job if it fails", "type": "integer" }, "dbCreationJobTTLSecondsAfterFinished": { "minimum": 1, - "title": "Time in seconds after which a finished create-db Job is automatically deleted. Leave empty to disable (recommended for GitOps/ArgoCD)", + "title": "Time in seconds after which the Sonataflow database creation Job is automatically deleted. Leave empty to disable (recommended for GitOps/ArgoCD)", "type": ["integer", "null"] }, "dbCreationJobActiveDeadlineSeconds": { "default": 120, "minimum": 1, - "title": "Maximum time in seconds for the create-db Job to complete before being terminated", + "title": "Maximum time in seconds for the Sonataflow database creation Job to complete before being terminated", "type": "integer" }, "jobServiceImage": { From 091a9b053f0047b6fec9ed0f37299f057e9a8dce Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Fri, 29 May 2026 17:23:49 +0200 Subject: [PATCH 3/3] fix(orchestrator): remove arbitrary max on dbCreationJobBackoffLimit Kubernetes does not enforce a maximum on backoffLimit. Assisted-by: Claude --- charts/backstage/values.schema.json | 1 - charts/backstage/values.schema.tmpl.json | 1 - 2 files changed, 2 deletions(-) diff --git a/charts/backstage/values.schema.json b/charts/backstage/values.schema.json index 3ba5af69..256b8a41 100644 --- a/charts/backstage/values.schema.json +++ b/charts/backstage/values.schema.json @@ -483,7 +483,6 @@ }, "dbCreationJobBackoffLimit": { "default": 2, - "maximum": 10, "minimum": 0, "title": "Number of retries for the Sonataflow database creation job if it fails", "type": "integer" diff --git a/charts/backstage/values.schema.tmpl.json b/charts/backstage/values.schema.tmpl.json index 2801d5ce..32aed84f 100644 --- a/charts/backstage/values.schema.tmpl.json +++ b/charts/backstage/values.schema.tmpl.json @@ -570,7 +570,6 @@ }, "dbCreationJobBackoffLimit": { "default": 2, - "maximum": 10, "minimum": 0, "title": "Number of retries for the Sonataflow database creation job if it fails", "type": "integer"