Skip to content

Conversation

@yasun1
Copy link
Contributor

@yasun1 yasun1 commented Dec 15, 2025

Close HYPERFLEET-352

Summary by CodeRabbit

  • Documentation
    • Restructured README into a Quick Start/Development/docs-centric hub and removed large in-repo API/resource examples in favor of external docs links.
    • Added API resources doc describing endpoints, payloads, pagination, and status semantics.
    • Added authentication, database, deployment, and development guides with setup and usage instructions.
    • Minor presentation fixes to testcontainers docs (code fence formatting).

✏️ Tip: You can customize this high-level summary in your review settings.

@openshift-ci openshift-ci bot requested review from ciaranRoche and vkareh December 15, 2025 11:17
@coderabbitai
Copy link

coderabbitai bot commented Dec 15, 2025

Walkthrough

This PR reorganizes repository documentation: README is simplified and reframed as a docs hub with looser tool/version wording and external links. It removes embedded API/resource content from the README and adds five new docs: docs/api-resources.md, docs/authentication.md, docs/database.md, docs/deployment.md, and docs/development.md. Minor formatting tweaks were made to docs/testcontainers.md. No source code or exported/public API declarations were changed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10–15 minutes

  • Changes are documentation-only with no functional code edits.
  • Review focus:
    • README.md: verify rewritten wording, tool/version references, and links to docs/.
    • docs/api-resources.md, docs/development.md, docs/deployment.md: spot-check accuracy of commands, sample payloads, environment variables, and Helm values.
    • docs/authentication.md, docs/database.md: validate security and DB setup instructions.
    • docs/testcontainers.md: confirm code fence changes render correctly.

Suggested labels

lgtm, approved

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: consolidating documentation by moving content from README into separate docs files (api-resources.md, authentication.md, database.md, deployment.md, development.md) and streamlining the README structure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c1ed6b9 and 24ac80a.

📒 Files selected for processing (7)
  • README.md (1 hunks)
  • docs/api-resources.md (1 hunks)
  • docs/authentication.md (1 hunks)
  • docs/database.md (1 hunks)
  • docs/deployment.md (1 hunks)
  • docs/development.md (1 hunks)
  • docs/testcontainers.md (2 hunks)
✅ Files skipped from review due to trivial changes (2)
  • docs/testcontainers.md
  • docs/api-resources.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/database.md
  • docs/deployment.md
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-12-12T11:04:29.971Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-12T11:04:29.971Z
Learning: Regenerate Go models from openapi/openapi.yaml using make generate command after specification changes

Applied to files:

  • docs/development.md
  • README.md
📚 Learning: 2025-12-12T11:04:29.971Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-12T11:04:29.971Z
Learning: Applies to cmd/hyperfleet/environments/**/*.go : Use environment-based configuration via OCM_ENV to select development, unit_testing, integration_testing, or production settings

Applied to files:

  • docs/development.md
📚 Learning: 2025-12-12T11:04:29.971Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-12T11:04:29.971Z
Learning: Use TypeSpec for API specification maintenance instead of directly editing OpenAPI YAML

Applied to files:

  • README.md
🔇 Additional comments (7)
docs/authentication.md (2)

64-66: Past issue verified as resolved.

The fenced code block now properly includes the text language specifier. This comment section is well-formatted and clearly shows the JWT token header format.


1-160: Comprehensive authentication documentation with clear mode separation.

The file effectively covers both development (no-auth) and production (OCM JWT) authentication modes with configuration examples, token validation details, authorization semantics, and troubleshooting guidance. Code blocks are properly formatted, and cross-references to deployment documentation are consistent and correct.

docs/development.md (3)

15-19: Past issue verified as resolved: Bash language specifier is present.

The prerequisite verification code block is properly formatted with the bash language specifier.


101-101: Past issues verified as resolved: Section headers are now proper markdown headings.

Both "Testing the API" (line 101) and "Production Mode (OCM Authentication)" (line 118) are correctly formatted as level-3 markdown headings (###) rather than emphasis.

Also applies to: 118-118


1-379: Thorough development guide with excellent coverage of code generation, testing, and workflows.

The file provides comprehensive guidance on local setup, code generation from OpenAPI specs, mock generation with mockgen, tool dependency management via bingo, and step-by-step development workflows. The ASCII workflow diagram (lines 196-203) clearly illustrates the generation pipeline. Cross-references to related documentation files are consistent and correct.

README.md (2)

143-143: Past issues verified as resolved: Documentation links now reference correct file names.

Lines 143 and 147 correctly reference docs/development.md instead of the previously incorrect docs/development-guide.md. The anchor reference at line 147 is properly formatted.

Also applies to: 147-147


1-168: Well-structured documentation hub with clear organization and consistent cross-references.

The refactored README effectively serves as an entry point, providing a quick-start guide, brief API overview, development commands, and links to comprehensive documentation. The "Documentation" section (lines 149-165) clearly organizes core and additional resources, with all relative links correctly formatted. Technology stack wording (line 9: "Go 1.24+") appropriately reflects flexibility while maintaining consistency with development guidance. The shift from embedded API content to a hub pattern is clean and maintainable.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 534bf22 and 5ca18f7.

📒 Files selected for processing (6)
  • README.md (1 hunks)
  • docs/api-resources.md (1 hunks)
  • docs/authentication.md (1 hunks)
  • docs/database.md (1 hunks)
  • docs/deployment.md (1 hunks)
  • docs/development-guide.md (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-12-12T11:04:29.971Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-12T11:04:29.971Z
Learning: Applies to pkg/db/migrations/**/*.go : Store cluster and node pool specifications as JSONB columns to allow flexible cloud provider configurations

Applied to files:

  • docs/database.md
📚 Learning: 2025-12-12T11:04:29.971Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-12T11:04:29.971Z
Learning: Regenerate Go models from openapi/openapi.yaml using make generate command after specification changes

Applied to files:

  • docs/development-guide.md
  • README.md
📚 Learning: 2025-12-12T11:04:29.971Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-12T11:04:29.971Z
Learning: Applies to cmd/hyperfleet/environments/**/*.go : Use environment-based configuration via OCM_ENV to select development, unit_testing, integration_testing, or production settings

Applied to files:

  • docs/development-guide.md
🪛 markdownlint-cli2 (0.18.1)
docs/deployment.md

64-64: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


139-139: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


144-144: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


149-149: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

docs/database.md

29-29: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

docs/development-guide.md

28-28: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


114-114: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


125-125: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

🔇 Additional comments (5)
docs/authentication.md (1)

1-161: Well-structured authentication documentation with comprehensive examples.

The authentication guide clearly covers both development (no-auth) and production (OCM JWT) modes with practical examples, configuration options, and troubleshooting. Cross-references to deployment.md are appropriate.

docs/api-resources.md (1)

410-414: Verify cross-reference to README.md anchor.

Line 412 references [Example Usage](../README.md#example-usage). Confirm that the README.md contains an "## Example Usage" heading (which it does per the updated README.md), so the anchor reference is valid.

docs/development-guide.md (1)

46-46: Excellent emphasis on post-clone code generation requirement.

The guidance to run make generate-all after cloning is clear and well-positioned. This aligns with the code generation workflow and prevents common developer pain points. Based on learnings from previous reviews, this is an important step.

README.md (2)

1-168: Successful restructuring from monolithic to modular documentation.

The README has been effectively condensed from a comprehensive reference to a clear landing page with appropriate links to detailed documentation. The "Quick Start" section is concise, the "Documentation" section provides good navigation, and the API resource descriptions appropriately defer to docs/api-resources.md. This restructuring achieves the PR objective of consolidating documentation while maintaining accessibility.


50-50: PREREQUISITES.md exists in the repository and the cross-references in README.md are valid. No action needed.

Likely an incorrect or invalid review comment.

Copy link

@coderabbitai coderabbitai bot left a comment

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 (5)
docs/authentication.md (2)

64-66: Add language specifier to code block.

Line 64 shows a fenced code block without a language specifier. Update to mark it as text:

-```
+```text
 Authorization: Bearer <jwt-token>

---

`139-156`: **Convert emphasis-styled headers to proper markdown headings.**

Lines 139, 144, and 149 use bold text (`**...**`) for section headers instead of markdown headings. Convert to level-4 headings (`####`) for correct document structure:

```diff
-**401 Unauthorized**
+#### 401 Unauthorized
 - Check token is valid and not expired

Apply the same conversion to lines 144 (**403 Forbidden**) and 149 (**Token debugging**).

docs/deployment.md (1)

114-132: Convert step headers to proper markdown headings.

Lines 114 and 125 use bold text (**Step N: ...**) for step headers instead of markdown headings. Convert to level-4 headings (####) for correct document hierarchy:

-**Step 1: Create database secret**
+#### Step 1: Create database secret
 ```bash
 kubectl create secret generic hyperfleet-db-external \

Apply the same conversion to line 125 (**Step 2: Deploy with external database**).

docs/api-resources.md (1)

9-15: Add language specifiers to endpoint listing code blocks.

Lines 9, 222, and 323 show fenced code blocks without language specifiers. Add text to properly mark them:

-```
+```text
 GET    /api/hyperfleet/v1/clusters
 POST   /api/hyperfleet/v1/clusters

Apply the same fix to:

  • Line 222 (NodePool endpoints)
  • Line 323 (Pagination example)
README.md (1)

29-42: Add language specifier to project structure code block.

Line 29 shows a project structure diagram in a fenced code block without a language specifier. Add text or bash to properly mark it:

-```
+```text
 hyperfleet-api/
 ├── cmd/hyperfleet-api/          # Application entry point
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ca18f7 and 4ec4933.

📒 Files selected for processing (6)
  • README.md (1 hunks)
  • docs/api-resources.md (1 hunks)
  • docs/authentication.md (1 hunks)
  • docs/database.md (1 hunks)
  • docs/deployment.md (1 hunks)
  • docs/development-guide.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/development-guide.md
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-12T11:04:29.971Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-12T11:04:29.971Z
Learning: Applies to pkg/db/migrations/**/*.go : Store cluster and node pool specifications as JSONB columns to allow flexible cloud provider configurations

Applied to files:

  • docs/database.md
🪛 markdownlint-cli2 (0.18.1)
docs/authentication.md

64-64: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


139-139: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


144-144: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


149-149: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

README.md

29-29: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

docs/api-resources.md

9-9: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


222-222: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


323-323: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

docs/deployment.md

114-114: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


125-125: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

🔇 Additional comments (2)
docs/database.md (1)

1-84: Solid documentation of database architecture and design patterns.

The database documentation is well-structured and comprehensive. The schema diagram is clear, and the design patterns section (JSONB for provider-specific configs, soft deletes, migrations) are appropriately detailed. Cross-references to related docs are consistent.

README.md (1)

1-165: Well-executed documentation restructuring with clear external reference hierarchy.

The README successfully transitions from an embedded documentation model to a higher-level overview that directs readers to specialized external docs. The Quick Start section is clear and actionable, the documentation links section comprehensively organizes all new docs, and cross-references are consistent. The updates to technology stack (Go 1.24+) and API definition (OpenAPI 3.0) are appropriately generic.

Minor: Address the markdown linting issues flagged above (language specifiers on code blocks, heading syntax), and all five files will provide a cohesive, well-structured documentation experience.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4ec4933 and c1ed6b9.

📒 Files selected for processing (6)
  • README.md (1 hunks)
  • docs/api-resources.md (1 hunks)
  • docs/authentication.md (1 hunks)
  • docs/database.md (1 hunks)
  • docs/deployment.md (1 hunks)
  • docs/development.md (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-12-12T11:04:29.971Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-12T11:04:29.971Z
Learning: Regenerate Go models from openapi/openapi.yaml using make generate command after specification changes

Applied to files:

  • README.md
  • docs/development.md
📚 Learning: 2025-12-12T11:04:29.971Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-12T11:04:29.971Z
Learning: Applies to cmd/hyperfleet/environments/**/*.go : Use environment-based configuration via OCM_ENV to select development, unit_testing, integration_testing, or production settings

Applied to files:

  • docs/development.md
📚 Learning: 2025-12-12T11:04:29.971Z
Learnt from: CR
Repo: openshift-hyperfleet/hyperfleet-api PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-12T11:04:29.971Z
Learning: Applies to pkg/db/migrations/**/*.go : Store cluster and node pool specifications as JSONB columns to allow flexible cloud provider configurations

Applied to files:

  • docs/database.md
🪛 markdownlint-cli2 (0.18.1)
docs/api-resources.md

29-29: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

docs/authentication.md

29-29: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (2)
docs/development.md (1)

1-379: Well-structured development guide with clear workflows.

The file provides comprehensive guidance on setup, development workflow, code generation, mock generation, and troubleshooting. Language specifiers are correctly applied throughout, and references to related documentation are accurate. Based on learnings, the guide appropriately emphasizes the make generate command for OpenAPI code generation and covers tool dependency management via Bingo.

README.md (1)

1-165: Well-executed documentation consolidation and restructuring.

The README has been appropriately simplified into a documentation hub that points to comprehensive external guides. The Quick Start section is concise and actionable, the Architecture section is clear, and the Documentation section provides good navigation to detailed guides. The shift from embedded technical details to external references follows best practices for documentation organization.


## Related Documentation

- [Development Guide](development-guide.md) - Local development setup
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix broken documentation reference.

Line 353 references development-guide.md, but the actual file is docs/development.md:

-[Development Guide](development-guide.md) - Local development setup
+[Development Guide](development.md) - Local development setup
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [Development Guide](development-guide.md) - Local development setup
- [Development Guide](development.md) - Local development setup
🤖 Prompt for AI Agents
In docs/deployment.md around line 353, the markdown link target points to
development-guide.md which does not exist; update the link to reference the
correct file docs/development.md (or the correct relative path from this file)
so the hyperlink resolves, e.g. change the link target to docs/development.md
and verify the link renders correctly in the built docs.

@@ -0,0 +1,414 @@
# API Resources

This document provides detailed information about the HyperFleet API resources, including endpoints, request/response formats, and usage patterns.
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we need this if we already have the OpenAPI contract and examples.
My concern is to have info duplicated here
I like to have the cURL examples though

kubectl get svc --namespace hyperfleet-system
```

### View Logs
Copy link
Contributor

Choose a reason for hiding this comment

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

For easier use of the examples I prefer if they use ENV variables, so I can copy&paste them right away

e.g.

kubectl logs -f deployment/$NAME --namespace $NAMESPACE

@rh-amarin
Copy link
Contributor

/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Dec 15, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rh-amarin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 0520ff0 into openshift-hyperfleet:main Dec 15, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants