-
Notifications
You must be signed in to change notification settings - Fork 105
Add /olm:opm command to build operator index image #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Xia-Zhao-rh The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Hi @Xia-Zhao-rh. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
.claude-plugin/marketplace.json
Outdated
| "description": "Generate HyperShift cluster creation commands via hcp CLI from natural language descriptions" | ||
| }, | ||
| { | ||
| "name": "operator-catalog", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these commands be part of the common OLM plugin? https://github.com/openshift-eng/ai-helpers/tree/main/plugins/olm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @chiragkyal
Thanks a lot for your comments.
The commands has been change to /olm:opm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea on namespacing, that will help with organization.
|
Please join the openshift-eng org. There's a pinned message on Slack. /ok-to-test |
cc5e5fe to
b0d35d4
Compare
WalkthroughAdds documentation and command metadata for a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant OlmPlugin as olm:opm (plugin)
participant OPM as opm CLI
participant Podman as podman
participant Registry as ImageRegistry
User->>OlmPlugin: /olm:opm <action> [args]
OlmPlugin->>OlmPlugin: validate args & prerequisites
alt validation fails
OlmPlugin-->>User: error (validation/prereq)
else validation succeeds
OlmPlugin->>OPM: run opm <action> [args]
alt action builds images
OPM->>Podman: create manifests / build / push
Podman->>Registry: push images
Podman-->>OPM: push result
end
OPM-->>OlmPlugin: result / output
OlmPlugin-->>User: formatted result or error
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
Comment |
There was a problem hiding this 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 (2)
plugins/olm/commands/opm.md (2)
10-10: Add language identifiers to fenced code blocks.Fenced code blocks throughout the file lack language specifications, reducing syntax highlighting and accessibility. Lines 10, 36, 49, 59, 72, 83, 94, 104, 116, 125, 136, 146, and 157 should use
```bashinstead of```.For example, apply this diff to line 10–17:
- ``` + ```bash /olm:opm build-index-image <catalog-path> <index-image-tag> [--cacheless] [--arch=<arch>] [--base-image=<image>] [--builder-image=<image>] /olm:opm build-semver-index-image <semver-template-file> <index-image-tag> [--cacheless] [--arch=<arch>] [--base-image=<image>] [--builder-image=<image>] /olm:opm generate-semver-template <bundle-list> [--output=<file>] [--major=true|false] [--minor=true|false] /olm:opm list packages <index-ref> /olm:opm list channels <index-ref> [package-name] /olm:opm list bundles <index-ref> [package-name] - ``` + ```Repeat for all other code blocks.
Also applies to: 36-36, 49-49, 59-59, 72-72, 83-83, 94-94, 104-104, 116-116, 125-125, 136-136, 146-146, 157-157
173-173: Wrap bare URL in angle brackets.Line 173 contains a bare URL without markdown link formatting. Wrap it in angle brackets or convert to a proper markdown link for better readability and consistency with markdown conventions.
Apply this diff:
- - Check for `opm`: `which opm` - - If not found, provide installation instructions: https://github.com/operator-framework/operator-registry/releases + - Check for `opm`: `which opm` + - If not found, provide installation instructions: <https://github.com/operator-framework/operator-registry/releases>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (3)
PLUGINS.md(1 hunks)docs/data.json(1 hunks)plugins/olm/commands/opm.md(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
plugins/olm/commands/opm.md
10-10: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
36-36: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
49-49: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
59-59: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
72-72: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
83-83: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
94-94: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
104-104: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
116-116: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
125-125: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
136-136: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
146-146: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
157-157: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
173-173: Bare URL used
(MD034, no-bare-urls)
🔇 Additional comments (3)
plugins/olm/commands/opm.md (1)
1-358: Documentation is comprehensive and well-structured.The opm command documentation is well-organized with clear sections for each action (build-index-image, build-semver-index-image, generate-semver-template, list packages/channels/bundles), detailed implementation workflows, and practical examples. The YAML frontmatter aligns with the metadata in docs/data.json, and prerequisites, defaults, and multi-architecture support are clearly articulated. The overall structure and content quality are solid.
docs/data.json (1)
331-336: Command entry is correctly formatted and consistent.The new opm command entry is properly structured with accurate description, a representative synopsis example, and a generic argument hint that covers all supported actions. Placement within the olm plugin commands array is appropriate.
PLUGINS.md (1)
126-126: New command listing is correctly integrated.The /olm:opm command entry is properly formatted, consistently placed within the Olm Plugin command list, and accurately describes the functionality. The integration with opm.md and docs/data.json is seamless.
b0d35d4 to
7634a0d
Compare
7634a0d to
11b38ef
Compare
What this PR does / why we need it:
This PR introduces a new
operator-catalogplugin that provides comprehensive tooling for building and managing operator catalog index images using OPM (Operator Package Manager) and Podman.Key Features:
Building Catalogs
generate-semver-template- Generate semver template configuration files from bundle listsbuild-semver-index- Build catalog index from semver templatesbuild-index- Build catalog index from existing catalog directoriesQuerying Catalogs
list-packages- List all packages in a cataloglist-channels- List channels for packageslist-bundles- List bundles with detailed informationWhy we need it:
This plugin automates the complete workflow for operator catalog management, from template generation to multi-platform image building and catalog inspection. It eliminates manual steps and
reduces errors in the catalog build process, making it easier for developers to:
Which issue(s) this PR fixes:
Fixes N/A (new feature)
Special notes for your reviewer:
Plugin Structure
Key Implementation Details
scratchbaseopm alphacommands for catalog operationsDependencies
opm(Operator Package Manager) - https://github.com/operator-framework/operator-registry/releasespodmanfor container operationsChecklist: