Skip to content

openshift-eng/oape-ai-e2e

Repository files navigation

oape-ai-e2e

Claude-based agentic workflow tool for Kubernetes operator controller development.

 flowchart TD
     subgraph Main["Development Agent"]
         direction TB
         START([Start]) --> INIT[init]
     end

     subgraph PR1["Phase 1: API Generation"]
         INIT --> API_GEN[api-generate: CRD Updates]
         API_GEN --> API_TESTS[api-generate-tests: Envtest Eval Updates]
         API_TESTS --> REVIEW1[review-and-fix]
         REVIEW1 --> RAISE_PR1[Raise PR #1]
     end

     subgraph PR2["Phase 2: API Implementation"]
         RAISE_PR1 --> API_IMPL[api-implement: Go Controller Updates + UTs]
         API_IMPL --> REVIEW2[review-and-fix]
         REVIEW2 --> RAISE_PR2[Raise PR #2]
     end

     subgraph PR3["Phase 3: E2E Tests"]
         RAISE_PR2 --> E2E_GEN[e2e-generate: Ginkgo e2e Suite Updates]
         E2E_GEN --> REVIEW3[review-and-fix]
         REVIEW3 --> RAISE_PR3[Raise PR #3]
     end

     subgraph Evaluation["Development Review"]
         RAISE_PR1 --> EVAL1{Evaluate PR #1}
         RAISE_PR2 --> EVAL2{Evaluate PR #2}
         RAISE_PR3 --> EVAL3{Evaluate PR #3}

         EVAL1 --> CI1[Wait for CI]
         EVAL2 --> CI2[Wait for CI]
         EVAL3 --> CI3[Wait for CI]

         CI1 -->|Pass| MERGE1[Review PR #1]
         CI2 -->|Pass| MERGE2[Review PR #2]
         CI3 -->|Pass| MERGE3[Review PR #3]

         MERGE1 & MERGE2 & MERGE3 --> DONE([Dev Complete])
     end

     style INIT fill:#e1f5fe
     style API_GEN fill:#fff3e0
     style API_TESTS fill:#fff3e0
     style API_IMPL fill:#e8f5e9
     style E2E_GEN fill:#fce4ec
     style REVIEW1 fill:#f3e5f5
     style REVIEW2 fill:#f3e5f5
     style REVIEW3 fill:#f3e5f5
     style DONE fill:#c8e6c9
Loading

Pre-requisites

The following tools must be installed and available on your system:

The container image used in Dockerfile already adds these dependencies, but you need to manage the credentials inside the container.

Optional

  • JIRA_PERSONAL_TOKEN environment variable -- required only for /oape:analyze-rfe (Jira API access).

Installation

Add the marketplace:

/plugin marketplace add openshift-eng/oape-ai-e2e

Install the plugin:

/plugin install oape@oape-ai-e2e

Use the commands:

/oape:api-generate https://github.com/openshift/enhancements/pull/1234

Updating Plugins

Update the marketplace (fetches latest plugin catalog):

/plugin marketplace update oape-ai-e2e

Reinstall the plugin (downloads new version):

/plugin install oape@oape-ai-e2e

Using Cursor

Cursor can discover the commands by symlinking this repo into your ~/.cursor/commands directory:

mkdir -p ~/.cursor/commands
git clone git@github.com:openshift-eng/oape-ai-e2e.git
ln -s oape-ai-e2e ~/.cursor/commands/oape-ai-e2e

Available Plugins

Plugin Description Commands
oape AI-driven OpenShift operator development tools /oape:init, /oape:api-generate, /oape:api-generate-tests, /oape:api-implement, /oape:analyze-rfe, /oape:e2e-generate, /oape:predict-regressions, /oape:review, /oape:implement-review-fixes

Commands

/oape:init -- Clone an Operator Repository

Clones an allowed OpenShift operator repository by short name into the current directory.

/oape:init cert-manager-operator

/oape:api-generate -- Generate API Types from Enhancement Proposal

Reads an OpenShift enhancement proposal PR, extracts the required API changes, and generates compliant Go type definitions in the correct paths of the current OpenShift operator repository.

/oape:api-generate https://github.com/openshift/enhancements/pull/1234

/oape:api-generate-tests -- Generate Integration Tests for API Types

Generates .testsuite.yaml integration test files for OpenShift API type definitions, covering create, update, validation, and error scenarios.

/oape:api-generate-tests api/v1alpha1/myresource_types.go

/oape:api-implement -- Generate Controller Implementation from Enhancement Proposal

Reads an OpenShift enhancement proposal PR, extracts the required implementation logic, and generates complete controller/reconciler code following controller-runtime and operator-sdk conventions.

/oape:api-implement https://github.com/openshift/enhancements/pull/1234

/oape:analyze-rfe -- Analyze RFE and Generate EPIC/Stories Breakdown

Analyzes a Jira Request for Enhancement (RFE) and produces a structured breakdown of Epics, user stories, and outcomes. Requires JIRA_PERSONAL_TOKEN for Jira API access.

/oape:analyze-rfe RFE-7841
/oape:analyze-rfe https://issues.redhat.com/browse/RFE-7841

/oape:e2e-generate -- Generate E2E Test Artifacts

Generates e2e test artifacts by discovering the repo structure and analyzing the git diff from a base branch.

/oape:e2e-generate main

/oape:predict-regressions -- Predict API Regressions and Breaking Changes

Analyzes git diff to predict potential regressions, breaking changes, and backward compatibility issues. Combines static analysis with LLM-powered semantic analysis.

/oape:predict-regressions main
/oape:predict-regressions origin/release-4.18 --output .reports

/oape:review -- Code Review Against Jira Requirements

Performs a production-grade code review that verifies code changes against Jira requirements.

/oape:review OCPBUGS-12345
/oape:review OCPBUGS-12345 origin/release-4.15

/oape:implement-review-fixes -- Apply Fixes from Review Report

Automatically applies code fixes from a review report.

/oape:implement-review-fixes <report-path>

Typical workflow:

# Step 1: Clone the operator repository
/oape:init cert-manager-operator

# Step 2: Generate API types
/oape:api-generate https://github.com/openshift/enhancements/pull/1234

# Step 3: Generate integration tests
/oape:api-generate-tests api/v1alpha1/

# Step 4: Predict potential regressions
/oape:predict-regressions main

# Step 5: Generate controller implementation
/oape:api-implement https://github.com/openshift/enhancements/pull/1234

# Step 6: Generate e2e tests for your changes
/oape:e2e-generate main

Deployment

Build the container images

podman build -t quay.io/your-username/oape-ai:agent-worker -f images/agent-worker.Dockerfile .
podman build -t quay.io/your-username/oape-ai:gh-token-minter -f images/gh-token-minter.Dockerfile .
podman build -t quay.io/your-username/oape-ai:go-server -f images/go-server.Dockerfile .

podman push quay.io/your-username/oape-ai:agent-worker
podman push quay.io/your-username/oape-ai:gh-token-minter
podman push quay.io/your-username/oape-ai:go-server

Configure the deployment

Edit deploy/deployment.yaml and fill in the required values which are placeholders for sensitive values.

Deploy on a k8s cluster

kubectl apply -k deploy/

Adding a New Command

  1. Add a new markdown file under plugins/oape/commands/
  2. The command will be available as /oape:<command-name>
  3. Update the plugin README.md documenting the new command

About

Tooling for AI Driven Kubernetes Operator Feature Development

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors