Skip to content

feat!: introduce new standalone RHDH Chart [RHDHPLAN-1058] - #438

Open
rm3l wants to merge 100 commits into
redhat-developer:mainfrom
rm3l:RHDHPLAN-1058--improve-helm-chart-configuration-experience-via-standalone-rhdh-helm-chart-without-backstage-subchart-dependency
Open

feat!: introduce new standalone RHDH Chart [RHDHPLAN-1058]#438
rm3l wants to merge 100 commits into
redhat-developer:mainfrom
rm3l:RHDHPLAN-1058--improve-helm-chart-configuration-experience-via-standalone-rhdh-helm-chart-without-backstage-subchart-dependency

Conversation

@rm3l

@rm3l rm3l commented Jun 17, 2026

Copy link
Copy Markdown
Member

Description of the change

This PR introduces a standalone rhdh chart that aims to simplify the Helm Chart configuration experience. To do this, it needs to own all Kubernetes templates directly, removing the subchart dependency entirely. See RHDHPLAN-1058 and RHDHPLAN-869 for the full rationale.

Design decisions

  • "Add, don't replace" by default, with override escape hatches. extraVolumes, extraEnv, extraInitContainers, etc. are always appended after system defaults so users never have to duplicate chart internals. When full control is needed, envOverride, argsOverride, commandOverride, and envFromOverride replace the system defaults entirely.
  • Built-in Lightspeed and Orchestrator as first-class features. Both are configured at the top level (lightspeed.*, orchestrator.*) with their own plugin lists, sidecar/init-container settings, and volume management; rather than requiring users to manually assemble dynamic plugin entries and extra containers.
  • Most existing features available in the upstream backstage chart, like PDB, HPA, Ingress, ..., are still preserved in this new chart.

Backstage chart deprecation

The backstage chart is marked deprecated: true and excluded from CI on main. It remains fully functional on release-1.y branches. The sync-upstream-backstage workflow is removed since there is no longer an upstream subchart to sync.

CI and tooling alignment

  • SonarCloud and Snyk scan rhdh instead of backstage; duplication detection excludes the deprecated chart via .sonarcloud.properties.
  • The test-charts action consolidates upgrade-skip logic and removes the hardcoded --debug flag from ct-install.yaml.
  • Pre-commit hooks drop the backstage-specific helm-dependency-update hook.

Which issue(s) does this PR fix or relate to

ref RHDHPLAN-1058

How to test changes / Special notes to the reviewer

  1. Lint: ct lint --charts charts/rhdh should pass with no warnings.
  2. Template sanity: helm template test charts/rhdh should render all resources without errors. Verify the dynamic-plugins ConfigMap contains only includes and plugins (no leaked initContainer, volume, etc.).
  3. Install on KinD: the CI values files under charts/rhdh/ci/ cover the main scenarios (default, lightspeed disabled, orchestrator enabled, custom PVC). Run ct install --charts charts/rhdh --config ct-install.yaml on a KinD cluster.
  4. Nightly matrix: review .github/workflows/nightly.yaml; the discover-charts job should produce {branch, chart} pairs respecting each branch's ct.yaml exclusions.
  5. Backstage on release branches: check out a release-1.y branch and confirm backstage is still in ct.yaml and testable.

A subsequent PR will add some detailed guidance (and maybe some tooling) to help migrate from the legacy chart to this one.

Checklist

  • For each Chart updated, version bumped in the corresponding Chart.yaml according to Semantic Versioning.
  • For each Chart updated, variables are documented in the values.yaml and added to the corresponding README.md.
  • JSON Schema template updated and re-generated the raw schema via the pre-commit hook.
  • Tests pass using the Chart Testing tool and the ct lint command.
  • If you updated the orchestrator-infra chart, make sure the versions of the Knative CRDs are aligned with the versions of the CRDs installed by the OpenShift Serverless operators declared in the values.yaml file.

rm3l added 3 commits June 17, 2026 08:50
…ency

Helm cannot merge lists, so when users set extraVolumes/extraEnvVars on
the current chart, the entire default list is replaced — forcing them to
copy-paste all system defaults just to add one item. This is a Day 2
maintenance burden that grows with every release.

This new chart at charts/rhdh/ owns all Kubernetes templates directly
and uses an "add, don't replace" pattern: system-required volumes,
mounts, env vars, and init containers are hardcoded in the Deployment
template, while user-provided values are always appended. Users can now
add a volume without knowing or duplicating the system defaults.

The values layout is flattened to match helm-create conventions
(replicaCount, image, service at root level) — no more navigating
global.*/upstream.backstage.* nesting to set basic options.

Assisted-by: Claude
The new rhdh chart owns all Kubernetes templates directly and no
longer depends on the upstream Backstage subchart, so the weekly
sync workflow and its helper script are no longer needed.

Assisted-by: Claude
@rm3l rm3l changed the title feat!: introduce new standalone RHDH Chart [RHDHPLAN 1058] feat!: introduce new standalone RHDH Chart [RHDHPLAN-1058] Jun 17, 2026
Comment thread charts/rhdh/templates/tests/test-connection.yaml Fixed
rm3l added 17 commits June 17, 2026 09:27
…ove-helm-chart-configuration-experience-via-standalone-rhdh-helm-chart-without-backstage-subchart-dependency

# Conflicts:
#	.github/workflows/sync-upstream-backstage.yaml
Port test scenarios from charts/backstage/ci/ with key paths adjusted
for the flat values layout. The custom-dynamic-pvc-claim-spec scenario
is dropped because the new chart hardcodes the dynamic-plugins-root
volume (user volumes are appended, not replaced).

Assisted-by: Claude
Add global.imageRegistry, global.imagePullSecrets, and
global.defaultStorageClass so they flow through to both the postgresql
subchart and the rhdh chart's own templates. Image helpers now delegate
to bitnami common's common.images.image, and imagePullSecrets are
merged from both global and root-level sources. Lightspeed container
images converted from strings to structured registry/repository/tag
maps so global.imageRegistry applies uniformly to all containers.

Also pins the test pod image to curl/curl:8.9.1 instead of latest,
adds automountServiceAccountToken: false and ephemeral-storage
requests to the test pod (SonarCloud findings).

Assisted-by: Claude
The previous version (12.10.0) was far behind. The new version
requires global.security.allowInsecureImages=true since we use a
Fedora-based PostgreSQL image instead of the bitnami one.

Assisted-by: Claude
…ion-experience-via-standalone-rhdh-helm-chart-without-backstage-subchart-dependency
…ove-helm-chart-configuration-experience-via-standalone-rhdh-helm-chart-without-backstage-subchart-dependency

# Conflicts:
#	.github/workflows/sync-upstream-backstage.yaml
…anch

chart-testing's --upgrade flag checks out the target branch and tries
to build dependencies for the chart there. For brand-new charts like
charts/rhdh/ that do not exist on main yet, this causes helm
dependency build to fail.

Make --upgrade conditional: when a specific chart is tested, check
whether its Chart.yaml exists on the target branch first. If not,
skip the upgrade test and only run a fresh install.

Also rename the backstageChartChanged output to orchestratorCrdsNeeded
and include charts/rhdh so that Knative and SonataFlow CRDs are
installed for both charts' orchestrator CI scenarios.
On vanilla K8s (KinD), there is no SCC to assign a common UID to all
containers in a pod. Set fsGroup so shared volumes (e.g. RAG data)
are group-writable across init containers and sidecars that may run
as different UIDs. Also disable the route, which is not available on
KinD.
Without a default appConfig, no app-config ConfigMap is created and
the RHDH application lacks essential configuration (base URLs, CORS,
database connection, backend auth), causing it to fail to start.

Add a default appConfig matching the backstage chart, providing:
- app.baseUrl and backend.baseUrl from rhdh.hostname
- backend.cors.origin
- backend.database.connection (postgres user, password from env var)
- backend.auth.externalAccess (legacy service-to-service auth)
…ion-experience-via-standalone-rhdh-helm-chart-without-backstage-subchart-dependency
rm3l added 2 commits July 7, 2026 18:54
Accept incoming changes, bumping backstage chart to 6.2.1.
Keep our deletion of sync-upstream-backstage.yaml.
…[RHIDP-14726]

Align the rhdh chart with the backstage chart change from PR redhat-developer#453:
use `enabled: true` instead of `disabled: false` for dynamic plugin
entries in values, schema, CI files, and documentation.

Assisted-by: Claude
rm3l added 3 commits July 7, 2026 19:02
…ack to 0.5.2

Use --no-preserve=mode,ownership when copying RAG data so the sidecar
(UID 1001) can access files written by the init container (UID 65532).
Pre-create the notebooks subdirectory and chmod the copied data to
prevent PermissionError on vanilla Kubernetes.

Also bump lightspeed-stack sidecar from 0.5.1 to 0.5.2.

Refs:
- redhat-developer#460
- redhat-developer#461

Assisted-by: Claude
The RAG init container permission fix (--no-preserve=mode,ownership +
chmod) makes a shared UID unnecessary. Only fsGroup is needed, matching
the backstage chart CI setup.

Assisted-by: Claude
rm3l added 9 commits July 22, 2026 12:26
…on detection

sonar.exclusions only covers bug/vulnerability analysis. Add
sonar.cpd.exclusions to also exclude the backstage chart from the
Copy-Paste Detector, fixing the duplication alert on rhdh-profile.py.
SonarCloud auto-analysis ignores sonar-project.properties and reads
.sonarcloud.properties instead. Move the exclusions there and add
sonar.cpd.exclusions to exclude the deprecated backstage chart from
duplication detection. Remove the unused sonar-project.properties.
…or test pod

Wire up global.imagePullSecrets via the rhdh.imagePullSecrets helper,
make imagePullPolicy configurable via test.image.pullPolicy, and allow
overriding the container securityContext via test.securityContext.
- Update orchestrator externalDB examples to use nested keys
  (externalDB.existingSecret/name/host/port) instead of flat keys
- Show proper dynamicPlugins.plugins YAML structure in notifications example
- Fix argsOverride/extraArgs descriptions not rendering in values table
- Update test pod section to mention pullPolicy and securityContext
- Fix typo: recieve -> receive
… K8s example

- Document *Override fields (envOverride, commandOverride, etc.) as
  escape hatches from the "add, don't replace" pattern
- Replace inaccurate "automatic hostname discovery" note with actual
  hostname derivation logic
- Remove runAsUser/runAsGroup from vanilla Kubernetes example
The RUNNER_DEBUG gate in the test-charts action already adds --debug
to ct when needed; having it hardcoded in ct-install.yaml caused noisy
helm debug logs on every CI run.
Replace deprecated backstage chart paths and values structure with rhdh
chart equivalents in docs, CONTRIBUTING.md, and orchestrator-software-templates.
The default appConfig.backend.database.connection now references
${POSTGRES_HOST}, ${POSTGRES_PORT}, and ${POSTGRES_USER} env vars
that the chart already injects. This eliminates the need for users
to duplicate externalDatabase connection info in appConfig overrides.

Simplify docs/external-db.md accordingly: remove the redundant
appConfig block, fix externalDatabase to use literal values instead
of env var references, and split secrets (password vs TLS env vars).
@sonarqubecloud

Copy link
Copy Markdown

@rm3l
rm3l marked this pull request as ready for review July 23, 2026 15:32
@rm3l
rm3l requested review from a team as code owners July 23, 2026 15:32
@rm3l
rm3l requested a review from a team July 23, 2026 15:33
@rm3l

rm3l commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@rhdh-qodo-merge

Copy link
Copy Markdown

PR Summary by Qodo

Introduce standalone RHDH Helm chart and deprecate legacy Backstage chart

✨ Enhancement ⚙️ Configuration changes 📝 Documentation 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Add standalone charts/rhdh chart owning all templates; remove upstream Backstage subchart
 dependency.
• Implement append-by-default lists with explicit override escape hatches for full control.
• Deprecate charts/backstage and retarget CI/scanners/docs to rhdh.
Diagram

graph TD
  U["User values"] --> C["charts/rhdh"] --> K[("Kubernetes resources")]
  C --> DB[("PostgreSQL")]
  C --> LS["Lightspeed (opt)"]
  C --> OR["Orchestrator (opt)"]
  CI["GitHub Actions"] --> C
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Keep Backstage subchart; paper over list-merge issues via wrapper values
  • ➕ Smaller change surface; less template ownership
  • ➕ Upstream chart updates remain more automated
  • ➖ Doesn’t truly fix Helm list replacement semantics; users still duplicate defaults
  • ➖ Continues leaking upstream structure into user-facing values
2. Post-render patching (Kustomize/Helm post-renderer) to append lists
  • ➕ Avoids forking upstream templates
  • ➕ Environment-specific patches can be layered cleanly
  • ➖ Non-Helm-native workflow adds tooling and support burden
  • ➖ Harder to validate and document; CI/users must adopt extra steps
3. Introduce a shared library chart for common logic across charts
  • ➕ Reduces duplication over time; clearer separation of shared helpers
  • ➕ Could support multiple product charts consistently
  • ➖ Additional packaging/maintenance complexity
  • ➖ Still requires template ownership to solve list-merge UX; not needed if rhdh becomes the primary chart

Recommendation: For the stated goal (simplify configuration and eliminate list-replacement footguns), a standalone chart that owns the Deployment and its list fields is the most effective approach. The chosen pattern (append by default + explicit override keys) is a good UX/safety balance; the main reviewer focus should be on correctness of the generated manifests, upgrade/migration implications, and CI coverage for key scenarios (default, external DB, Lightspeed/Orchestrator toggles).

Files changed (55) +8133 / -290

Enhancement (20) +2095 / -0
Chart.yamlIntroduce standalone 'redhat-developer-hub' chart metadata and dependencies +57/-0

Introduce standalone 'redhat-developer-hub' chart metadata and dependencies

• Adds the new chart definition, annotations, and dependencies (bitnami common library and optional postgresql subchart).

charts/rhdh/Chart.yaml

config.yamlVendor Lightspeed config into the new chart +221/-0

Vendor Lightspeed config into the new chart

• Adds Lightspeed configuration content under 'charts/rhdh/files/lightspeed' so the standalone chart can manage Lightspeed as a first-class feature.

charts/rhdh/files/lightspeed/config.yaml

lightspeed-stack.yamlVendor Lightspeed stack configuration into the new chart +48/-0

Vendor Lightspeed stack configuration into the new chart

• Adds Lightspeed stack content used by templates and/or documentation to configure Lightspeed components.

charts/rhdh/files/lightspeed/lightspeed-stack.yaml

rhdh-profile.pyAdd Lightspeed RHDH profile file +257/-0

Add Lightspeed RHDH profile file

• Adds the Lightspeed profile used by the chart-managed Lightspeed configuration flow.

charts/rhdh/files/lightspeed/rhdh-profile.py

_helpers.tplAdd core helpers for naming, labels, images, and feature wiring +286/-0

Add core helpers for naming, labels, images, and feature wiring

• Introduces helper templates for consistent resource naming/labels and for rendering images with global overrides. Provides building blocks used across the new chart templates.

charts/rhdh/templates/_helpers.tpl

app-config-configmap.yamlRender 'appConfig' into a ConfigMap for mounting +15/-0

Render 'appConfig' into a ConfigMap for mounting

• Adds a ConfigMap template that materializes inline Backstage 'appConfig' into a file mounted into the backend container.

charts/rhdh/templates/app-config-configmap.yaml

deployment.yamlAdd standalone Deployment implementing append-by-default lists and feature gates +499/-0

Add standalone Deployment implementing append-by-default lists and feature gates

• Adds the primary Deployment template that hardcodes system-required volumes/env/init containers and appends user-provided extras. Supports explicit override keys for full replacement and integrates optional Lightspeed/DB wait/orchestrator behavior.

charts/rhdh/templates/deployment.yaml

dynamic-plugins-configmap.yamlGenerate dynamic plugins ConfigMap from base + feature plugin lists +35/-0

Generate dynamic plugins ConfigMap from base + feature plugin lists

• Creates a ConfigMap that merges dynamic plugin definitions from base config plus optional Lightspeed and Orchestrator plugin lists, ensuring the generated YAML is constrained to the intended plugin fields.

charts/rhdh/templates/dynamic-plugins-configmap.yaml

hpa.yamlAdd HPA template for autoscaling +36/-0

Add HPA template for autoscaling

• Introduces HorizontalPodAutoscaler support in the standalone chart, gated by values.

charts/rhdh/templates/hpa.yaml

httproute.yamlAdd Gateway API HTTPRoute support +53/-0

Add Gateway API HTTPRoute support

• Adds an HTTPRoute template to expose the service via Gateway API when enabled.

charts/rhdh/templates/httproute.yaml

ingress.yamlAdd Kubernetes Ingress support +48/-0

Add Kubernetes Ingress support

• Adds an Ingress template to expose the service in clusters using Ingress controllers.

charts/rhdh/templates/ingress.yaml

lightspeed-configmaps.yamlAdd Lightspeed ConfigMaps templates +27/-0

Add Lightspeed ConfigMaps templates

• Templates Lightspeed configuration ConfigMaps for the standalone chart’s Lightspeed integration.

charts/rhdh/templates/lightspeed/lightspeed-configmaps.yaml

network-policies.yamlAdd orchestrator NetworkPolicy templates +85/-0

Add orchestrator NetworkPolicy templates

• Adds NetworkPolicy resources for orchestrator-related components, gated by orchestrator enablement/settings.

charts/rhdh/templates/orchestrator/network-policies.yaml

sonataflows.yamlAdd SonataFlowPlatform resource template for orchestrator mode +225/-0

Add SonataFlowPlatform resource template for orchestrator mode

• Adds SonataFlowPlatform rendering when orchestrator features are enabled, with safeguards against duplicate platforms and DB wiring for internal vs external PostgreSQL.

charts/rhdh/templates/orchestrator/sonataflows.yaml

pdb.yamlAdd PodDisruptionBudget template +22/-0

Add PodDisruptionBudget template

• Introduces a PDB template to preserve availability during disruptions, gated by values.

charts/rhdh/templates/pdb.yaml

route.yamlAdd OpenShift Route template +55/-0

Add OpenShift Route template

• Adds Route support for OpenShift-native exposure when enabled.

charts/rhdh/templates/route.yaml

secrets.yamlAdd Secrets templates for chart-managed credentials +15/-0

Add Secrets templates for chart-managed credentials

• Adds Secret templating to support required application credentials/tokens and to integrate with existing-secret references where configured.

charts/rhdh/templates/secrets.yaml

service.yamlAdd Service template for backend exposure +57/-0

Add Service template for backend exposure

• Introduces a Service resource (ports/selectors/annotations) owned by the standalone chart.

charts/rhdh/templates/service.yaml

serviceaccount.yamlAdd ServiceAccount template and configuration +21/-0

Add ServiceAccount template and configuration

• Adds ServiceAccount creation and configuration (including naming overrides) for least-privilege deployments.

charts/rhdh/templates/serviceaccount.yaml

servicemonitor.yamlAdd ServiceMonitor support for Prometheus Operator +33/-0

Add ServiceMonitor support for Prometheus Operator

• Adds optional ServiceMonitor integration for clusters using the Prometheus Operator stack.

charts/rhdh/templates/servicemonitor.yaml

Tests (5) +111 / -0
default-values.yamlAdd CI scenario values for default install +8/-0

Add CI scenario values for default install

• Adds a baseline values file used by chart-testing to validate default rendering/install of the new chart.

charts/rhdh/ci/default-values.yaml

with-custom-configuration-values.yamlAdd CI scenario values for custom configuration coverage +27/-0

Add CI scenario values for custom configuration coverage

• Introduces a values file to validate common customization paths and the chart’s append/override behavior during installs.

charts/rhdh/ci/with-custom-configuration-values.yaml

with-external-db-values.yamlAdd CI scenario values for external database wiring +24/-0

Add CI scenario values for external database wiring

• Adds a values file that exercises external DB configuration paths to ensure templates/install work with externally provisioned PostgreSQL.

charts/rhdh/ci/with-external-db-values.yaml

with-lightspeed-disabled-values.yamlAdd CI scenario values validating Lightspeed disablement +9/-0

Add CI scenario values validating Lightspeed disablement

• Adds a values file verifying Lightspeed can be disabled cleanly while other chart functions continue to work.

charts/rhdh/ci/with-lightspeed-disabled-values.yaml

test-connection.yamlAdd Helm test for basic connectivity +43/-0

Add Helm test for basic connectivity

• Adds a test manifest used by 'helm test'/chart-testing to validate service connectivity and basic readiness.

charts/rhdh/templates/tests/test-connection.yaml

Documentation (13) +1064 / -227
CONTRIBUTING.mdRemove upstream Backstage sync workflow docs; keep Lightspeed sync guidance +2/-58

Remove upstream Backstage sync workflow docs; keep Lightspeed sync guidance

• Removes documentation for syncing the upstream Backstage subtree and related dependency steps. Updates Lightspeed vendoring guidance to reference 'charts/rhdh/files/lightspeed'.

CONTRIBUTING.md

README.mdReplace placeholder README with chart catalog and deprecation notice +11/-12

Replace placeholder README with chart catalog and deprecation notice

• Adds a charts table highlighting 'rhdh' as active and 'backstage' as deprecated. Updates issue-reporting guidance and links.

README.md

README.mdDocument Backstage deprecation +6/-2

Document Backstage deprecation

• Updates Backstage chart documentation to reflect deprecated status and point users to the new 'rhdh' chart.

charts/backstage/README.md

README.md.gotmplUpdate Backstage README template for deprecation messaging +3/-1

Update Backstage README template for deprecation messaging

• Adjusts README generation template to consistently show deprecation guidance for the legacy chart.

charts/backstage/README.md.gotmpl

README.mdMinor README alignment edits +2/-2

Minor README alignment edits

• Updates documentation wording/links for consistency after the repository’s chart focus shifts to 'rhdh'.

charts/orchestrator-software-templates/README.md

NOTES.txtAdjust NOTES text for consistency +8/-8

Adjust NOTES text for consistency

• Updates the post-install NOTES output without changing chart behavior.

charts/orchestrator-software-templates/templates/NOTES.txt

README.mdAdd comprehensive 'rhdh' chart documentation +515/-0

Add comprehensive 'rhdh' chart documentation

• Provides full user-facing documentation for configuring and installing the standalone chart, including feature toggles and common operational options.

charts/rhdh/README.md

README.md.gotmplAdd helmdocs template for 'rhdh' README generation +361/-0

Add helmdocs template for 'rhdh' README generation

• Introduces the README template used by helmdocs to generate the 'rhdh' README from values/schema metadata.

charts/rhdh/README.md.gotmpl

secret.example.yamlAdd example Lightspeed secret manifest +31/-0

Add example Lightspeed secret manifest

• Provides an example secret to guide users enabling Lightspeed with the required credentials/settings.

charts/rhdh/files/lightspeed/secret.example.yaml

NOTES.txtAdd install notes for the standalone chart +12/-0

Add install notes for the standalone chart

• Adds post-install guidance rendered by Helm, tailored to the new standalone 'rhdh' chart configuration options.

charts/rhdh/templates/NOTES.txt

catalog-index-configuration.mdUpdate catalog index docs to match 'rhdh' configuration keys +21/-23

Update catalog index docs to match 'rhdh' configuration keys

• Reworks catalog index documentation to align with the new 'rhdh' values layout and recommended configuration patterns.

docs/catalog-index-configuration.md

external-db.mdUpdate external DB docs for the standalone chart +57/-67

Update external DB docs for the standalone chart

• Aligns external DB documentation with the 'rhdh' chart’s values/secret conventions and supported deployment paths.

docs/external-db.md

monitoring.mdUpdate monitoring docs for 'rhdh' resources and values +35/-54

Update monitoring docs for 'rhdh' resources and values

• Updates monitoring guidance (e.g., ServiceMonitor/metrics options) to match the new standalone chart’s resource set and configuration keys.

docs/monitoring.md

Other (17) +4863 / -63
CODEOWNERSAlign CODEOWNERS with new 'rhdh' chart ownership +1/-0

Align CODEOWNERS with new 'rhdh' chart ownership

• Updates repository ownership rules to reflect the new standalone chart as a primary review surface and to keep chart-related changes routed correctly.

.github/CODEOWNERS

action.ymlExtend chart-testing action for 'rhdh' prerequisites and scenarios +122/-24

Extend chart-testing action for 'rhdh' prerequisites and scenarios

• Refactors the composite action to detect 'charts/rhdh' changes and provision additional prerequisites (e.g., Orchestrator CRDs and external DB test resources). Adds setup steps to support 'rhdh' CI values scenarios during 'ct install'.

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

nightly.yamlBuild per-branch chart matrix and add 'rhdh' nightly overrides +33/-19

Build per-branch chart matrix and add 'rhdh' nightly overrides

• Changes nightly discovery to generate a per-branch matrix (respecting each branch’s excluded charts). Adds 'rhdh'-specific generated values for plugin/lightspeed/orchestrator template sanity and wires correct '--set' overrides for images.

.github/workflows/nightly.yaml

snyk.yamlRetarget Snyk scan matrix from 'backstage' to 'rhdh' +4/-4

Retarget Snyk scan matrix from 'backstage' to 'rhdh'

• Updates the Snyk workflow matrix to scan 'charts/rhdh' (including an orchestrator-enabled variant) instead of the legacy 'backstage' chart.

.github/workflows/snyk.yaml

test.yamlUse 'rhdh' values layout for template sanity generation +4/-4

Use 'rhdh' values layout for template sanity generation

• Updates the workflow step that generates a “full plugins” values file so it reads from the flattened 'rhdh' values structure and passes the resulting file to chart testing.

.github/workflows/test.yaml

.pre-commit-config.yamlRemove backstage-specific dependency update hook +0/-6

Remove backstage-specific dependency update hook

• Drops the local pre-commit hook that updated vendored Backstage chart dependencies, matching the move away from upstream Backstage subtree management.

.pre-commit-config.yaml

.sonarcloud.propertiesExclude deprecated 'charts/backstage' from SonarCloud and CPD +2/-1

Exclude deprecated 'charts/backstage' from SonarCloud and CPD

• Updates SonarCloud exclusions to ignore the deprecated Backstage chart and excludes it from duplication detection to avoid noisy results.

.sonarcloud.properties

Chart.yamlMark Backstage chart as deprecated +2/-1

Mark Backstage chart as deprecated

• Sets 'deprecated: true' and bumps the chart version to clearly signal that Backstage is legacy in favor of the new standalone 'rhdh' chart.

charts/backstage/Chart.yaml

Chart.yamlMinor chart metadata adjustments +1/-1

Minor chart metadata adjustments

• Updates orchestrator software templates chart metadata to stay consistent with repo-wide chart management and documentation expectations.

charts/orchestrator-software-templates/Chart.yaml

.helmignoreAdd '.helmignore' for the new chart +23/-0

Add '.helmignore' for the new chart

• Defines ignored files for packaging the new standalone chart cleanly.

charts/rhdh/.helmignore

Chart.lockAdd dependency lock for 'rhdh' +9/-0

Add dependency lock for 'rhdh'

• Introduces a lock file to pin dependency resolution for reproducible installs in CI and user environments.

charts/rhdh/Chart.lock

chart_schema.yamlAdd helmdocs schema config for documentation generation +37/-0

Add helmdocs schema config for documentation generation

• Adds helmdocs configuration for schema/doc generation behavior for the new chart.

charts/rhdh/chart_schema.yaml

values.schema.jsonAdd generated JSON schema for 'rhdh' values +2404/-0

Add generated JSON schema for 'rhdh' values

• Introduces a comprehensive values schema to improve validation and editor/autocomplete support.

charts/rhdh/values.schema.json

values.schema.tmpl.jsonAdd schema template used to generate 'values.schema.json' +1528/-0

Add schema template used to generate 'values.schema.json'

• Adds the schema template source used by tooling/pre-commit to generate the final schema output.

charts/rhdh/values.schema.tmpl.json

values.yamlAdd flattened values model with append-by-default semantics and overrides +686/-0

Add flattened values model with append-by-default semantics and overrides

• Defines the new standalone chart’s configuration surface (flattened root keys, top-level dynamicPlugins/lightspeed/orchestrator) and documents append-vs-override behavior for lists and container settings.

charts/rhdh/values.yaml

ct-install.yamlSkip deprecated Backstage chart and remove forced debug in installs +4/-2

Skip deprecated Backstage chart and remove forced debug in installs

• Updates chart-testing install configuration to exclude the deprecated 'backstage' chart and drops the hardcoded '--debug' flag.

ct-install.yaml

ct.yamlExclude deprecated Backstage chart from chart-testing runs +3/-1

Exclude deprecated Backstage chart from chart-testing runs

• Adds 'backstage' to excluded charts (deprecated) while retaining demo-only chart exclusions.

ct.yaml

@rhdh-qodo-merge

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (0) 🔗 Cross-repo conflicts (2) 📜 Skill insights (0)

Context used
⚠️ Tickets: not configured — ticket URL found in PR but could not be fetched — check ticket provider credentials
✅ Cross-repo context
  Explored: repo: redhat-developer/rhdh (sha: d090bd1a)
  Explored: repo: redhat-developer/rhdh-plugins (sha: 83d8a479)
  Explored: repo: redhat-developer/rhdh-must-gather (sha: b51bef59)

Grey Divider


Action required

1. Backend secret rotates 🐞 Bug ☼ Reliability
Description
charts/rhdh/templates/secrets.yaml uses randAlphaNum directly in the Secret data, so a `helm
upgrade` will rewrite the backend auth secret even when values are unchanged. This can invalidate
service-to-service auth and cause unexpected outages after upgrades.
Code

charts/rhdh/templates/secrets.yaml[R13-14]

+data:
+  {{ include "rhdh.backend-secret-key" . }}: {{ (ternary (randAlphaNum 24) .Values.auth.backend.value (empty .Values.auth.backend.value)) | b64enc | quote }}
Relevance

⭐⭐ Medium

Secret rotation on upgrade is a real outage risk, but no close precedent on lookup/preserving
randAlphaNum secrets.

PR-#326

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The Secret template embeds a random value in the rendered manifest; without lookup/preservation,
Helm will change the Secret on subsequent upgrades.

charts/rhdh/templates/secrets.yaml[1-15]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The backend auth Secret is rendered with a fresh random value on each Helm render (`randAlphaNum`), causing unintended secret rotation on upgrades.

### Issue Context
This Secret is used to populate `BACKEND_SECRET` in the Deployment, so changing it across upgrades can break inter-service authentication/session validation.

### Fix Focus Areas
- charts/rhdh/templates/secrets.yaml[1-15]

### Suggested fix
Use `lookup` (or a helper like Bitnami common password management) to reuse the existing Secret value when it already exists, and only generate a random value on first install when neither `auth.backend.value` nor `auth.backend.existingSecretRef` is set.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Wrong wait-for-db port 🐞 Bug ≡ Correctness
Description
In charts/rhdh/templates/deployment.yaml, the wait-for-db initContainer sets dbPort from
.Values.externalDatabase.port even when .Values.postgresql.enabled is true. If a user sets
externalDatabase.port while using embedded PostgreSQL, pods can hang indefinitely waiting on the
wrong port.
Code

charts/rhdh/templates/deployment.yaml[R301-305]

+            - |
+              dbHost={{ include "rhdh.postgresql.host" . | quote }}
+              dbPort={{ .Values.externalDatabase.port | default 5432 | quote }}
+              echo "Waiting for DB at $dbHost:$dbPort..."
+              until timeout 2 bash -c ">/dev/tcp/$dbHost/$dbPort" 2>/dev/null; do
Relevance

⭐⭐⭐ High

Clear correctness bug (can hang pods); team has accepted DB connection/port correctness fixes
before.

PR-#173

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The initContainer is rendered when either embedded or external DB is used, but the port variable is
always sourced from externalDatabase.port, which can diverge from the embedded DB port.

charts/rhdh/templates/deployment.yaml[280-309]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The `wait-for-db` initContainer always uses `.Values.externalDatabase.port` for `dbPort`, even when the embedded PostgreSQL service is selected.

### Issue Context
`wait-for-db` is enabled for both embedded and external DB modes, but the port should be derived from the selected DB mode (embedded -> 5432 / service port; external -> `.Values.externalDatabase.port`).

### Fix Focus Areas
- charts/rhdh/templates/deployment.yaml[280-309]

### Suggested fix
Set `dbPort` conditionally:
- if `.Values.postgresql.enabled` use `5432` (or the embedded service port if configurable)
- else use `.Values.externalDatabase.port | default 5432`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Automount value ignored 🐞 Bug ⛨ Security
Description
serviceAccount.automount is only applied to the ServiceAccount object when
serviceAccount.create=true, but the Deployment Pod spec does not set
automountServiceAccountToken. With the default serviceAccount.create=false, the chart value
cannot reliably disable token mounting for an existing ServiceAccount.
Code

charts/rhdh/templates/deployment.yaml[R47-49]

+    spec:
+      serviceAccountName: {{ include "rhdh.serviceAccountName" . }}
+      {{- include "rhdh.imagePullSecrets" . | nindent 6 }}
Relevance

⭐⭐⭐ High

Repo has accepted wiring SA token automounting to chart values / disabling mounts for security.

PR-#326

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The ServiceAccount’s automountServiceAccountToken field is only rendered when the chart creates
the SA, while the Deployment always selects a SA but does not set the Pod-level override, so the
value is not reliably applied.

charts/rhdh/templates/serviceaccount.yaml[1-21]
charts/rhdh/templates/deployment.yaml[47-53]
PR-#326

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`serviceAccount.automount` is not enforced at the Pod level, so it becomes non-authoritative when users provide an existing ServiceAccount (`serviceAccount.create=false`).

### Issue Context
Kubernetes allows overriding SA token mounting per-Pod via `spec.automountServiceAccountToken`. Charts commonly bind this to the chart value to ensure the setting works regardless of whether the SA is created by the chart.

### Fix Focus Areas
- charts/rhdh/templates/deployment.yaml[47-55]
- charts/rhdh/templates/serviceaccount.yaml[1-21]

### Suggested fix
Add `automountServiceAccountToken: {{ .Values.serviceAccount.automount }}` under `spec.template.spec` in the Deployment. Keep the ServiceAccount field as-is (it still helps when the SA is chart-managed), but the Pod-level field should be the enforcement mechanism.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. Docs anchor breaks install 🔗 Cross-repo conflict ⚙ Maintainability
Description
redhat-developer/rhdh documentation links to rhdh-chart’s root README #usage anchor for Helm
installation, but this PR’s root README no longer contains that usage section, so the downstream doc
link becomes stale/non-functional. This causes broken install guidance for users following the rhdh
repo docs.
Code

README.md[R2-14]

+# RHDH Helm Charts

-This repository now houses the only RHDH CI Helm chart after merging with the now deprecated repository: https://github.com/rhdh-bot/openshift-helm-charts/. 
+## Charts

-See:  https://issues.redhat.com/browse/RHIDP-1477
-
-# RHDH Helm Chart for OpenShift
-
-See [charts/backstage/README.md](charts/backstage/README.md).
-
-# RHDH orchestrator infra Helm chart for Openshift
-
-See [charts/orchestrator-infra/README.md](charts/orchestrator-infra/README.md)
+| Chart | Path | Status |
+|-------|------|--------|
+| **Red Hat Developer Hub** | [charts/rhdh/](charts/rhdh/README.md) | Active |
+| Orchestrator Infra (OpenShift) | [charts/orchestrator-infra/](charts/orchestrator-infra/README.md) | Active |
+| Must-Gather | [charts/must-gather/](charts/must-gather/) | Active |
+| Orchestrator Software Templates | [charts/orchestrator-software-templates/](charts/orchestrator-software-templates/) | Demo only |
+| Orchestrator Software Templates Infra | [charts/orchestrator-software-templates-infra/](charts/orchestrator-software-templates-infra/) | Demo only |
+| Backstage (legacy) | [charts/backstage/](charts/backstage/README.md) | **Deprecated** — use [Red Hat Developer Hub](charts/rhdh/README.md) instead |
Relevance

⭐⭐⭐ High

Docs/link regressions are typically fixed quickly to avoid breaking downstream install guidance.

PR-#280

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The rhdh repo hard-links to the root README #usage anchor, while the updated root README content
shown in this PR no longer provides that section/anchor, so the downstream link becomes stale.

README.md[2-14]
External repo: redhat-developer/rhdh, docs/helm-chart.md [1-5]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`redhat-developer/rhdh` links to the `rhdh-chart` repo README `#usage` anchor for Helm install instructions, but this PR rewrites the root README to a chart index without a `Usage` section. This makes the downstream documentation link non-functional.

### Issue Context
This is a cross-repo documentation contract: `rhdh` users are sent to `rhdh-chart#usage` for installation.

### Fix Focus Areas
- README.md[2-14]

### Suggested fix
Either:
1. Re-introduce a `## Usage` section (so `#usage` exists) that points to the new standalone chart install docs (e.g., link to `charts/rhdh/README.md`), **or**
2. Add a small `## Usage` section that contains the prior install snippet(s) and a short deprecation note for `backstage`.

Also consider opening a follow-up PR in `redhat-developer/rhdh` to update `docs/helm-chart.md` to the new canonical URL once available.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (1)
5. Backstage deprecation not coordinated 🔗 Cross-repo conflict ☼ Reliability
Description
This PR marks the backstage chart deprecated and excludes it from chart-testing on main, but both
redhat-developer/rhdh and redhat-developer/rhdh-must-gather still install the backstage chart and
set values under upstream.backstage.*/global.*. Until those repos migrate to the new standalone
chart, excluding backstage from CI increases the chance of untested regressions/drift breaking
downstream automation.
Code

ct.yaml[R6-9]

excluded-charts:
+  # Deprecated in favor of the rhdh chart
+  - backstage
+  # Demo-only charts, not meant for production deployment
Relevance

⭐⭐ Medium

CI-scope/deprecation coordination is process/ownership dependent; no clear precedent whether they
keep testing deprecated charts.

PR-#480

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The PR explicitly deprecates/excludes the backstage chart from CI. Meanwhile, downstream repos
still install that chart and configure it via upstream.backstage.* and global.* values,
demonstrating active consumption that would be at risk if regressions slip in due to reduced
validation.

ct.yaml[6-9]
charts/backstage/Chart.yaml[42-51]
External repo: redhat-developer/rhdh, .ci/manual-tests/postgres/install.sh [6-22]
External repo: redhat-developer/rhdh, .ci/pipelines/lib/helm.sh [214-235]
External repo: redhat-developer/rhdh, scripts/rhdh-openshift-setup/quick-start-rhdh.sh [3-8]
External repo: redhat-developer/rhdh-must-gather, tests/e2e/run-e2e-tests.sh [324-329]
External repo: redhat-developer/rhdh-must-gather, tests/e2e/run-e2e-tests.sh [405-415]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
Downstream repos still actively consume the legacy `backstage` chart, but this PR deprecates it and removes it from CI coverage (`ct.yaml` excluded-charts). That creates a coordination gap: downstream may keep using `backstage` while upstream stops validating it.

### Issue Context
Known consumers:
- `redhat-developer/rhdh` scripts install `rhdh-chart/backstage` and set `upstream.backstage.*`.
- `redhat-developer/rhdh-must-gather` e2e installs `backstage` from `https://redhat-developer.github.io/rhdh-chart` on `main`.

### Fix Focus Areas
- ct.yaml[6-9]
- charts/backstage/Chart.yaml[42-51]

### Suggested fix
Pick one coordinated path:
1) **Transition period:** keep minimal CI coverage for `charts/backstage` (don’t exclude it yet, or test it in at least one workflow) until downstream repos have migrated.

AND/OR
2) **Migration coordination:** open/track follow-up PRs in `redhat-developer/rhdh` and `redhat-developer/rhdh-must-gather` to:
- Install the new standalone chart (and use its new values schema, e.g., `image.*`, `dynamicPlugins.*`, `catalogIndex.*`),
- Stop relying on `upstream.backstage.*` and `global.dynamic.*` keys.

Once downstream migration is complete, fully retire CI coverage and/or remove the legacy chart.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@rhdh-qodo-merge rhdh-qodo-merge Bot added documentation Improvements or additions to documentation enhancement New feature or request Tests labels Jul 23, 2026
Comment thread CONTRIBUTING.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants