From db2d8b6af74a68c37c97b487c19f8893aa6574bd Mon Sep 17 00:00:00 2001 From: Fortune-Ndlovu Date: Tue, 19 May 2026 12:55:25 +0100 Subject: [PATCH] fix(orchestrator): add Helm hook annotations to sonataflow DB creation Job Kubernetes Jobs have immutable spec.template fields, so `helm upgrade` fails when the Job spec changes between chart versions. Adding post-install/post-upgrade hook with before-hook-creation delete policy ensures the old Job is removed before the new one is created. --- charts/backstage/Chart.yaml | 2 +- charts/backstage/README.md | 4 ++-- charts/backstage/templates/sonataflows.yaml | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/charts/backstage/Chart.yaml b/charts/backstage/Chart.yaml index 0c50edf5..40bd4aac 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.13.2 +version: 5.13.3 diff --git a/charts/backstage/README.md b/charts/backstage/README.md index 2666cd49..3ac8e7a9 100644 --- a/charts/backstage/README.md +++ b/charts/backstage/README.md @@ -1,7 +1,7 @@ # RHDH Backstage Helm Chart for OpenShift -![Version: 5.13.2](https://img.shields.io/badge/Version-5.13.2-informational?style=flat-square) +![Version: 5.13.3](https://img.shields.io/badge/Version-5.13.3-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.13.2 +helm install my-backstage redhat-developer/backstage --version 5.13.3 ``` ## Introduction diff --git a/charts/backstage/templates/sonataflows.yaml b/charts/backstage/templates/sonataflows.yaml index d957f89d..da74f0da 100644 --- a/charts/backstage/templates/sonataflows.yaml +++ b/charts/backstage/templates/sonataflows.yaml @@ -87,6 +87,9 @@ kind: Job metadata: name: {{ .Release.Name }}-create-sonataflow-database namespace: {{ .Release.Namespace }} + annotations: + "helm.sh/hook": post-install,post-upgrade + "helm.sh/hook-delete-policy": before-hook-creation spec: activeDeadlineSeconds: 120 template: