From 4fbe981fe45431a077b364ee6ded3559321fc186 Mon Sep 17 00:00:00 2001 From: Gustavo Lira Date: Tue, 9 Jun 2026 11:53:33 -0300 Subject: [PATCH] fix(orchestrator): use versioned name for the DB creation Job to avoid immutable upgrade errors The `-create-sonataflow-database` Job uses a fixed name across chart versions. When a field in the rendered pod spec changes between versions (e.g. the pinned PostgreSQL image digest), an in-place `helm upgrade` of an Orchestrator-enabled release tries to patch the Job's immutable `spec.template` and fails: Job.batch "-create-sonataflow-database" is invalid: spec.template: ... field is immutable Use a versioned name `-create-sf-db-` so each chart version gets a distinct Job (recreated instead of patched). This is the minimal part of #407 needed to fix the upgrade; the fail-hard / configurable backoffLimit changes (RHDHBUGS-2577) are intentionally left out of the 1.10 line. Fixes RHDHBUGS-3325. Targets 1.10.1. Co-Authored-By: Claude Opus 4.8 Signed-off-by: Gustavo Lira --- charts/backstage/Chart.yaml | 2 +- charts/backstage/README.md | 4 ++-- charts/backstage/templates/sonataflows.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/backstage/Chart.yaml b/charts/backstage/Chart.yaml index d42609e1..0d602ef9 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: 5.12.3 +version: 5.12.4 diff --git a/charts/backstage/README.md b/charts/backstage/README.md index 44327092..44ea21df 100644 --- a/charts/backstage/README.md +++ b/charts/backstage/README.md @@ -1,7 +1,7 @@ # RHDH Backstage Helm Chart for OpenShift -![Version: 5.12.3](https://img.shields.io/badge/Version-5.12.3-informational?style=flat-square) +![Version: 5.12.4](https://img.shields.io/badge/Version-5.12.4-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 5.12.3 +helm install my-backstage redhat-developer/backstage --version 5.12.4 ``` ## Introduction diff --git a/charts/backstage/templates/sonataflows.yaml b/charts/backstage/templates/sonataflows.yaml index d957f89d..32245f91 100644 --- a/charts/backstage/templates/sonataflows.yaml +++ b/charts/backstage/templates/sonataflows.yaml @@ -85,7 +85,7 @@ 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