Fix running FC UI as an OCP plugin#307
Conversation
WalkthroughThe README.md file was updated to provide clearer instructions and additional information about running the Flight Control UI as an OpenShift Container Platform (OCP) plugin. The new content clarifies its development-only intent, default image usage, environment variable override, and compatible OpenShift console versions. Changes
Suggested reviewers
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (4)
README.md (3)
45-47: Clarify development-only context and improve style.
The new note is helpful, but consider a stronger warning with consistent casing and punctuation:- **Note**: this setup is only for development, do not use it in Production environments! + **Warning**: This mode is for development only — do not use it in production environments.
50-52: Specify fenced code block language for clarity.
To satisfy markdownlint MD040 and improve readability, declare the language for thenpm run dev:ocpsnippet:- ``` + ```bash npm run dev:ocp<details> <summary>🧰 Tools</summary> <details> <summary>🪛 markdownlint-cli2 (0.17.2)</summary> 50-50: Fenced code blocks should have a language specified null (MD040, fenced-code-language) </details> </details> --- `53-56`: **Provide an inline example for setting `CONSOLE_VERSION`.** It may be clearer to show how to prefix the command with the env var. For example: ```diff - By default, the latest available OpenShift console image will be used. To specify a different console version, set the `CONSOLE_VERSION` environment variable. + By default, the latest OpenShift console image is used. To pick a version, prefix the command: + ```bash + CONSOLE_VERSION=4.18 npm run dev:ocp + ```apps/ocp-plugin/start-ocp-console.sh (1)
22-24: Add a clear development-only warning at the top.
Since OAuth is disabled and you’re injecting a bearer token directly (development-only behavior), it’s helpful to surface this in the script header:+# Warning: for local development only. Do not run in production environments. # The console's internal mechanism for user authentication via OAuth is disabled. # We are providing the authentication token directly to the console process, which it will use for all API calls. BRIDGE_USER_AUTH="disabled"🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 24-24: BRIDGE_USER_AUTH appears unused. Verify use (or export if used externally).
(SC2034)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
README.md(1 hunks)apps/ocp-plugin/start-ocp-console.sh(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md
50-50: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
🪛 Shellcheck (0.10.0)
apps/ocp-plugin/start-ocp-console.sh
[warning] 24-24: BRIDGE_USER_AUTH appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 25-25: BRIDGE_K8S_MODE appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 26-26: BRIDGE_CA_FILE appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 27-27: BRIDGE_USER_AUTH_OIDC_CLIENT_ID appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 28-28: BRIDGE_USER_AUTH_OIDC_CLIENT_SECRET_FILE appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 29-29: BRIDGE_USER_AUTH_OIDC_CA_FILE appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 30-30: BRIDGE_K8S_MODE_OFF_CLUSTER_SKIP_VERIFY_TLS appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 32-32: BRIDGE_K8S_AUTH_BEARER_TOKEN appears unused. Verify use (or export if used externally).
(SC2034)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: integration-tests
- GitHub Check: Lint
- GitHub Check: Build ocp plugin
- GitHub Check: Build
🔇 Additional comments (1)
apps/ocp-plugin/start-ocp-console.sh (1)
32-33: Verify that the new bearer-token variable is consumed by the console.
You’ve introducedBRIDGE_K8S_AUTH_BEARER_TOKENin place of the oldBRIDGE_K8S_AUTHsetting. Please confirm that the console startup logic uses this variable for API authentication as intended.🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 32-32: BRIDGE_K8S_AUTH_BEARER_TOKEN appears unused. Verify use (or export if used externally).
(SC2034)
edb9b2a to
ed4e25f
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
README.md (3)
45-46: Polish the development-only warning
The note is crucial but can be more concise and consistent. For example:Note: This setup is intended for development only and should not be used in production.
Also, standardize the capitalization of “production” to match the rest of the docs.
53-54: Show a concrete override example
To make theCONSOLE_VERSIONoverride crystal clear, include an inline example. E.g.:CONSOLE_VERSION=4.18 npm run dev:ocpThis gives users a direct template for specifying a different console image.
56-57: Plan for compatibility list maintenance
Hard-coding “4.16 to 4.20” will require manual updates as new OCP versions arrive. Consider adding a link to the official console release notes or include a TODO/reminder to expand this range when validating against newer releases.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md
50-50: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: integration-tests
- GitHub Check: Build ocp plugin
- GitHub Check: Build
- GitHub Check: Lint
The
npm run dev:ocpscript was not working for latest Console versions, only for version 4.16.Modified the auth settings so the script is compatible with Console versions 4.16 to 4.20.
Since we'd be not having user auth, added a note regarding that this setup is not intented for Production purposes.
Summary by CodeRabbit