Allow enabling Orchestrator plugin on rhdh - #1297
Conversation
Signed-off-by: gazarenkov <gazarenkov@gmail.com>
Signed-off-by: gazarenkov <gazarenkov@gmail.com>
# Conflicts: # bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml
Co-authored-by: gazarenkov <gazarenkov@users.noreply.github.com>
|
|
There was a problem hiding this comment.
Pull Request Overview
This PR introduces changes that enable the Orchestrator plugin for RHDH by updating plugin package names, configuration, and related documentation.
- Updated plugin package references in YAML configurations and examples.
- Modified environment variable and volume mount settings to support the new plugin setup.
- Updated autogenerated code and configuration files to reflect the new plugin configurations.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/model/secretenvs_test.go | Added test to verify secret environment variable naming. |
| examples/orchestrator.yaml | Updated plugin package references to use npm registry names. |
| docs/dynamic-plugins.md | Updated documentation with additional guidance for enabling the Orchestrator plugin. |
| config/profile/rhdh/default-config/secret-files.yaml | Added new secret configuration for dynamic plugins. |
| config/profile/rhdh/default-config/dynamic-plugins.yaml | Replaced URL plugins with npm package references. |
| config/profile/rhdh/default-config/deployment.yaml | Adjusted environment variable and volume mount configuration for secret files. |
| cmd/main.go | Removed an unused commented configuration line. |
| bundle/rhdh/manifests/rhdh-default-config_v1_configmap.yaml | Updated dynamic plugins configuration and image reference. |
| bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml | Updated metadata timestamp. |
| api/v1alpha*/zz_generated.deepcopy.go | Standardized import aliasing for API versions. |
Reviewer's GuideThis PR refactors the way the Orchestrator plugin is enabled by switching plugin package references to scoped npm artifacts, removing inline secret mounts and updating NPM config paths across manifests, introducing a standalone Secret manifest for npmrc injection, updating documentation and operator metadata, and applying minor code and test cleanups. Flow diagram for plugin package resolution and secret injectionflowchart TD
A[User enables Orchestrator plugin in config]
B[Backstage deployment starts]
C[dynamic-plugins-npmrc Secret mounted]
D[.npmrc config available in container]
E[Plugins fetched from npm.registry.redhat.com]
F[Orchestrator plugin enabled]
A --> B --> C --> D --> E --> F
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @gazarenkov - I've reviewed your changes - here's some feedback:
- Consider extracting the orchestrator plugin version string into a shared variable or generator so you don’t have to manually bump it across all of the YAMLs.
- Remove the leftover commented-out
IsOpenShiftline in cmd/main.go and the placeholder block in secret-files.yaml to keep the codebase clean. - Double-check that the updated NPM_CONFIG_USERCONFIG path (/opt/app-root/src/.npmrc.dynamic-plugins/.npmrc) is correctly wired into all deployment profiles and any build/install scripts.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider extracting the orchestrator plugin version string into a shared variable or generator so you don’t have to manually bump it across all of the YAMLs.
- Remove the leftover commented-out `IsOpenShift` line in cmd/main.go and the placeholder block in secret-files.yaml to keep the codebase clean.
- Double-check that the updated NPM_CONFIG_USERCONFIG path (/opt/app-root/src/.npmrc.dynamic-plugins/.npmrc) is correctly wired into all deployment profiles and any build/install scripts.
## Individual Comments
### Comment 1
<location> `docs/dynamic-plugins.md:72` </location>
<code_context>
- scaffolder-backend-module
-See [example](/examples/orchestrator.yaml) for a complete configuration of the orchestrator plugin.
+These plugins are located in npm.registry.redhat.com NPM registry and included to the RHDH default.dynamic-plugins.yaml configuration file, so to enable Orchestrator a user should just enable them along with Sonataflow dependency.
+See [example](/examples/orchestrator.yaml) for a configuration of the orchestrator plugin.
</code_context>
<issue_to_address>
Use 'included in' instead of 'included to', and add 'the' before 'Sonataflow dependency'.
The correct phrasing is: 'included in the RHDH default.dynamic-plugins.yaml configuration file, so to enable Orchestrator, a user should just enable them along with the Sonataflow dependency.'
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
These plugins are located in npm.registry.redhat.com NPM registry and included to the RHDH default.dynamic-plugins.yaml configuration file, so to enable Orchestrator a user should just enable them along with Sonataflow dependency.
=======
These plugins are located in npm.registry.redhat.com NPM registry and included in the RHDH default.dynamic-plugins.yaml configuration file, so to enable Orchestrator, a user should just enable them along with the Sonataflow dependency.
>>>>>>> REPLACE
</suggested_fix>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: gazarenkov <gazarenkov@users.noreply.github.com>
|
|
|
Closed and reopened to retrigger the PR checks. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rm3l The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
6efea4a
into
redhat-developer:main
* rhdh orchestrator config Signed-off-by: gazarenkov <gazarenkov@gmail.com> * back the image Signed-off-by: gazarenkov <gazarenkov@gmail.com> * fix docs Signed-off-by: gazarenkov <gazarenkov@gmail.com> * Regenerate bundle/installer manifests Co-authored-by: gazarenkov <gazarenkov@users.noreply.github.com> * Update docs/dynamic-plugins.md Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * fix rhdh integration test * fix config * Regenerate bundle/installer manifests Co-authored-by: gazarenkov <gazarenkov@users.noreply.github.com> * plugins registry docs placeholder * revert dynamic-plugins-registry-auth with deprecation note * Regenerate bundle/installer manifests Co-authored-by: gazarenkov <gazarenkov@users.noreply.github.com> --------- Signed-off-by: gazarenkov <gazarenkov@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: gazarenkov <gazarenkov@users.noreply.github.com> Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Description
NOTE: it depends on redhat-developer/rhdh#3016 (will be in draft until merge 3016)
Which issue(s) does this PR fix or relate to
https://issues.redhat.com/browse/RHIDP-7919
PR acceptance criteria
How to test changes / Special notes to the reviewer
To test:
Then:
Summary by Sourcery
Enable Orchestrator plugin on Red Hat Developer Hub by switching to Red Hat npm package references, refining dynamic plugin configuration, and updating related manifests, documentation, and tests.
Enhancements:
Documentation:
Tests:
Chores: