Skip to content

Commit 5984355

Browse files
committed
fix(orchestrator): use versioned name for the DB creation Job to avoid immutable upgrade errors (#427)
The `<release>-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 "<release>-create-sonataflow-database" is invalid: spec.template: ... field is immutable Use a versioned name `<release>-create-sf-db-<chart-version>` 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. Signed-off-by: Gustavo Lira <guga.java@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Lucas <lyoon@redhat.com>
1 parent e767157 commit 5984355

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/actions/test-charts/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,6 @@ runs:
166166
"--set route.enabled=false"
167167
"--set upstream.ingress.enabled=true"
168168
"--set global.host=rhdh.127.0.0.1.sslip.io"
169-
"--set upstream.backstage.podSecurityContext.runAsUser=1001"
170-
"--set upstream.backstage.podSecurityContext.runAsGroup=1001"
171169
"--set upstream.backstage.podSecurityContext.fsGroup=1001"
172170
)
173171
if [[ -n "$INPUT_EXTRA_HELM_ARGS" ]]; then

charts/backstage/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ sources: []
4747
# Versions are expected to follow Semantic Versioning (https://semver.org/)
4848
# Note that when this chart is published to https://github.com/openshift-helm-charts/charts
4949
# it will follow the RHDH versioning 1.y.z
50-
version: 5.12.4
50+
version: 5.12.5

charts/backstage/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# RHDH Backstage Helm Chart for OpenShift
33

4-
![Version: 5.12.4](https://img.shields.io/badge/Version-5.12.4-informational?style=flat-square)
4+
![Version: 5.12.5](https://img.shields.io/badge/Version-5.12.5-informational?style=flat-square)
55
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
66

77
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:
2929
helm repo add bitnami https://charts.bitnami.com/bitnami
3030
helm repo add redhat-developer https://redhat-developer.github.io/rhdh-chart
3131

32-
helm install my-backstage redhat-developer/backstage --version 5.12.4
32+
helm install my-backstage redhat-developer/backstage --version 5.12.5
3333
```
3434

3535
## Introduction

charts/backstage/values.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
"enabled": true,
186186
"initContainer": {
187187
"args": [
188-
"mkdir -p /tmp/data && echo 'Copying Lightspeed RAG data...' && cp -r /rag/vector_db /rag-content/ && cp -r /rag/embeddings_model /rag-content/ && echo 'Copy complete.'"
188+
"mkdir -p /tmp/data && echo 'Copying Lightspeed RAG data...' && cp -r --no-preserve=mode,ownership /rag/vector_db /rag-content/ && cp -r --no-preserve=mode,ownership /rag/embeddings_model /rag-content/ && mkdir -p /rag-content/vector_db/notebooks && chmod -R a+rwX /rag-content && echo 'Copy complete.'"
189189
],
190190
"command": [
191191
"sh",

charts/backstage/values.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,10 @@ global:
135135
- >-
136136
mkdir -p /tmp/data &&
137137
echo 'Copying Lightspeed RAG data...' &&
138-
cp -r /rag/vector_db /rag-content/ &&
139-
cp -r /rag/embeddings_model /rag-content/ &&
138+
cp -r --no-preserve=mode,ownership /rag/vector_db /rag-content/ &&
139+
cp -r --no-preserve=mode,ownership /rag/embeddings_model /rag-content/ &&
140+
mkdir -p /rag-content/vector_db/notebooks &&
141+
chmod -R a+rwX /rag-content/vector_db/rag-content/embeddings_model &&
140142
echo 'Copy complete.'
141143
env: []
142144
# -- Resource requests/limits for the Lightspeed RAG bootstrap init container.

0 commit comments

Comments
 (0)