Skip to content

add samples for CRDs, so that operator-sdk can build valid bundle.#58

Merged
raptorsun merged 1 commit into
openshift:mainfrom
raptorsun:example-annotation
Jun 3, 2026
Merged

add samples for CRDs, so that operator-sdk can build valid bundle.#58
raptorsun merged 1 commit into
openshift:mainfrom
raptorsun:example-annotation

Conversation

@raptorsun
Copy link
Copy Markdown
Contributor

@raptorsun raptorsun commented Jun 3, 2026

Summary by CodeRabbit

  • Documentation
    • Added comprehensive sample configuration manifests to guide deployment and use of the agentic framework on OpenShift. Includes practical examples for configuring AI-powered agents with multiple LLM models, designing multi-stage approval workflows with manual review gates, setting up provider integrations, and managing the complete proposal lifecycle from analysis through execution, verification, and escalation result tracking.

Signed-off-by: Haoyu Sun <hasun@redhat.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 3, 2026

📝 Walkthrough

Walkthrough

This PR adds a complete set of sample YAML manifests for the OpenShift Agentic operator API, demonstrating configuration and usage patterns for the agentic.openshift.io/v1alpha1 resource types, along with a Kustomization file to bundle them for deployment.

Changes

Sample Manifests and Configuration

Layer / File(s) Summary
Infrastructure and policy setup
config/samples/agentic_v1alpha1_agent.yaml, config/samples/agentic_v1alpha1_llmprovider.yaml, config/samples/agentic_v1alpha1_approvalpolicy.yaml
Agent default selects the vertex-ai LLMProvider using claude-opus-4-6 model with 200 max turns; LLMProvider vertex-ai configures Google Cloud Vertex backend with Anthropic as the model provider; ApprovalPolicy cluster sets concurrency and attempt limits with manual approval required for Analysis, Execution, and Verification stages.
Proposal and approval workflow
config/samples/agentic_v1alpha1_proposal.yaml, config/samples/agentic_v1alpha1_proposalapproval.yaml
Proposal fix-crashloop requests remediation for a crash-looping api-server in the production namespace, assigning analysis/execution/verification to specific agents; ProposalApproval fix-crashloop tracks the two-stage workflow with Analysis and Execution approval states.
Result tracking resources
config/samples/agentic_v1alpha1_analysisresult.yaml, config/samples/agentic_v1alpha1_executionresult.yaml, config/samples/agentic_v1alpha1_escalationresult.yaml, config/samples/agentic_v1alpha1_verificationresult.yaml
AnalysisResult, ExecutionResult, EscalationResult, and VerificationResult manifests define the status and outcome resources generated at each workflow stage, referencing proposal fix-crashloop and tracking retry indices where applicable.
Kustomization assembly
config/samples/kustomization.yaml
Kustomization default bundles all nine sample manifests into a single deployable configuration resource list.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • blublinsky
  • harche
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding YAML sample manifests for Custom Resource Definitions (CRDs) to enable operator-sdk bundle building.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

@openshift-ci openshift-ci Bot requested review from joshuawilson and xrajesh June 3, 2026 20:26
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jun 3, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign xrajesh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link
Copy Markdown

@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: 1

🧹 Nitpick comments (1)
config/samples/agentic_v1alpha1_verificationresult.yaml (1)

3-5: ⚡ Quick win

Add correlation label for realistic sample.

The controller creates VerificationResult resources with a agentic.openshift.io/proposal label for discovery and correlation. Including this label would make the sample more realistic and functional.

📋 Proposed enhancement
 metadata:
   name: fix-crashloop-0
   namespace: openshift-lightspeed
+  labels:
+    agentic.openshift.io/proposal: fix-crashloop
 spec:

As per relevant code snippet from controller/proposal/results.go:159-204 and test/e2e/verification_test.go:53-63, the label is used for listing VerificationResults by proposal.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/samples/agentic_v1alpha1_verificationresult.yaml` around lines 3 - 5,
The sample is missing the correlation label the controller expects; add a
metadata.labels entry with key "agentic.openshift.io/proposal" and value equal
to the proposal name (e.g., the metadata.name "fix-crashloop-0") so
VerificationResult listing by proposal will work; see the controller logic in
controller/proposal/results.go and the e2e usage in
test/e2e/verification_test.go for where that label is required.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@config/samples/agentic_v1alpha1_proposal.yaml`:
- Around line 10-15: The proposal sample references undefined agents: change
analysis.agent and verification.agent from "smart" and "fast" to the existing
"default" agent (or alternatively add matching Agent samples named "smart" and
"fast"); locate the keys analysis.agent, execution.agent, and verification.agent
in agentic_v1alpha1_proposal.yaml and either replace their values with "default"
to match agentic_v1alpha1_agent.yaml or add new Agent sample manifests named
"smart" and "fast" that match the existing Agent CRD so the references resolve.

---

Nitpick comments:
In `@config/samples/agentic_v1alpha1_verificationresult.yaml`:
- Around line 3-5: The sample is missing the correlation label the controller
expects; add a metadata.labels entry with key "agentic.openshift.io/proposal"
and value equal to the proposal name (e.g., the metadata.name "fix-crashloop-0")
so VerificationResult listing by proposal will work; see the controller logic in
controller/proposal/results.go and the e2e usage in
test/e2e/verification_test.go for where that label is required.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f0e3edc3-dd13-4e5b-8e13-e0a9f131b6dc

📥 Commits

Reviewing files that changed from the base of the PR and between eed7142 and 1b4562e.

📒 Files selected for processing (10)
  • config/samples/agentic_v1alpha1_agent.yaml
  • config/samples/agentic_v1alpha1_analysisresult.yaml
  • config/samples/agentic_v1alpha1_approvalpolicy.yaml
  • config/samples/agentic_v1alpha1_escalationresult.yaml
  • config/samples/agentic_v1alpha1_executionresult.yaml
  • config/samples/agentic_v1alpha1_llmprovider.yaml
  • config/samples/agentic_v1alpha1_proposal.yaml
  • config/samples/agentic_v1alpha1_proposalapproval.yaml
  • config/samples/agentic_v1alpha1_verificationresult.yaml
  • config/samples/kustomization.yaml

Comment on lines +10 to +15
analysis:
agent: smart
execution:
agent: default
verification:
agent: fast
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Proposal references agents (smart, fast) that aren't part of the samples.

Only the default Agent is defined (agentic_v1alpha1_agent.yaml). The analysis.agent: smart and verification.agent: fast references have no corresponding sample manifests, so applying these samples as a workflow would point at non-existent agents. Either reuse default for all stages or add smart/fast Agent samples.

Proposed alignment with the defined agent
   analysis:
-    agent: smart
+    agent: default
   execution:
     agent: default
   verification:
-    agent: fast
+    agent: default
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/samples/agentic_v1alpha1_proposal.yaml` around lines 10 - 15, The
proposal sample references undefined agents: change analysis.agent and
verification.agent from "smart" and "fast" to the existing "default" agent (or
alternatively add matching Agent samples named "smart" and "fast"); locate the
keys analysis.agent, execution.agent, and verification.agent in
agentic_v1alpha1_proposal.yaml and either replace their values with "default" to
match agentic_v1alpha1_agent.yaml or add new Agent sample manifests named
"smart" and "fast" that match the existing Agent CRD so the references resolve.

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jun 3, 2026

@raptorsun: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@raptorsun raptorsun merged commit dbbdd74 into openshift:main Jun 3, 2026
6 of 7 checks passed
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.

1 participant