Skip to content

Fix running FC UI as an OCP plugin#307

Merged
celdrake merged 1 commit into
flightctl:mainfrom
celdrake:fix-ocp-plugin-dev-mode
Jun 11, 2025
Merged

Fix running FC UI as an OCP plugin#307
celdrake merged 1 commit into
flightctl:mainfrom
celdrake:fix-ocp-plugin-dev-mode

Conversation

@celdrake

@celdrake celdrake commented May 30, 2025

Copy link
Copy Markdown
Collaborator

The npm run dev:ocp script 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

  • Documentation
    • Enhanced instructions for running the Flight Control UI as an OpenShift Container Platform plugin, clarifying its development-only usage, default console image behavior, environment variable override, and supported OpenShift console versions.

@coderabbitai

coderabbitai Bot commented May 30, 2025

Copy link
Copy Markdown

Walkthrough

The 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

File(s) Change Summary
README.md Enhanced documentation for running the UI as an OCP plugin, specifying usage intent, config, and compatibility details.

Suggested reviewers

  • rawagner

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the npm run dev:ocp snippet:

- ```
+ ```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

📥 Commits

Reviewing files that changed from the base of the PR and between baf55b8 and edb9b2a.

📒 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 introduced BRIDGE_K8S_AUTH_BEARER_TOKEN in place of the old BRIDGE_K8S_AUTH setting. 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)

@celdrake celdrake force-pushed the fix-ocp-plugin-dev-mode branch from edb9b2a to ed4e25f Compare June 11, 2025 11:10

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the CONSOLE_VERSION override crystal clear, include an inline example. E.g.:

CONSOLE_VERSION=4.18 npm run dev:ocp

This 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

📥 Commits

Reviewing files that changed from the base of the PR and between edb9b2a and ed4e25f.

📒 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

@celdrake celdrake merged commit f2628e4 into flightctl:main Jun 11, 2025
6 checks passed
@celdrake celdrake deleted the fix-ocp-plugin-dev-mode branch June 11, 2025 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants