-
Notifications
You must be signed in to change notification settings - Fork 90
CNTRLPLANE-1732: feat(hcp): add HyperShift cluster command generator plugin #94
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
Merged
openshift-merge-bot
merged 1 commit into
openshift-eng:main
from
jparrill:CNTRLPLANE-1732
Oct 31, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "name": "hcp", | ||
| "description": "Generate HyperShift cluster creation commands via hcp CLI from natural language descriptions", | ||
| "version": "0.0.1", | ||
| "author": { | ||
| "name": "github.com/openshift-eng" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| # HCP Plugin | ||
|
|
||
| The HCP plugin generates intelligent `hypershift create cluster` commands from natural language descriptions across multiple cloud providers and platforms. | ||
|
|
||
| ## Overview | ||
|
|
||
| This plugin translates natural language descriptions into precise, ready-to-execute `hypershift create cluster` commands, applying provider-specific best practices and handling complex parameter validation automatically. The plugin **generates commands for you to run** - it does not provision clusters directly. | ||
|
|
||
| ## Commands | ||
|
|
||
| ### `/hcp:generate` | ||
|
|
||
| Generate ready-to-execute hypershift cluster creation commands from natural language descriptions. | ||
|
|
||
| **Usage:** | ||
| ``` | ||
| /hcp:generate <provider> <cluster-description> | ||
| ``` | ||
|
|
||
| **Supported Providers:** | ||
| - `aws` - Amazon Web Services | ||
| - `azure` - Microsoft Azure (self-managed control plane) | ||
| - `kubevirt` - KubeVirt on existing Kubernetes clusters | ||
| - `openstack` - OpenStack clouds | ||
| - `powervs` - IBM Cloud PowerVS | ||
| - `agent` - Bare metal and edge deployments | ||
|
|
||
| **Examples:** | ||
| ```bash | ||
| # AWS development cluster | ||
| /hcp:generate aws "development cluster for testing new features" | ||
|
|
||
| # High-availability KubeVirt cluster | ||
| /hcp:generate kubevirt "production cluster with high availability" | ||
|
|
||
| # Cost-optimized Azure cluster | ||
| /hcp:generate azure "small cluster for dev work, minimize costs" | ||
|
|
||
| # Disconnected bare metal cluster | ||
| /hcp:generate agent "airgapped cluster for secure environment" | ||
| ``` | ||
|
|
||
| ## Key Features | ||
|
|
||
| - **Multi-Provider Support**: Works with AWS, Azure, KubeVirt, OpenStack, PowerVS, and Agent providers | ||
| - **Smart Analysis**: Extracts requirements from natural language descriptions | ||
| - **Interactive Prompts**: Guides users through provider-specific configurations | ||
| - **Best Practices**: Applies provider-specific defaults and optimizations | ||
| - **Security Validation**: Ensures safe parameter handling and credential management | ||
| - **Network Conflict Prevention**: Especially critical for KubeVirt deployments | ||
|
|
||
| ## Provider-Specific Skills | ||
|
|
||
| The plugin uses specialized skills for each provider: | ||
|
|
||
| - **`hcp-create-aws`**: AWS-specific guidance including STS credentials, IAM roles, and VPC configuration | ||
| - **`hcp-create-azure`**: Azure identity configuration, resource groups, and region management | ||
| - **`hcp-create-kubevirt`**: Network conflict prevention, VM sizing, and storage class management | ||
| - **`hcp-create-openstack`**: OpenStack credentials, external networks, and flavor selection | ||
| - **`hcp-create-powervs`**: IBM Cloud integration, processor types, and resource group management | ||
| - **`hcp-create-agent`**: Bare metal deployment, agent management, and disconnected environments | ||
|
|
||
| ## Installation | ||
|
|
||
| ### From AI Helpers Marketplace | ||
|
|
||
| ```bash | ||
| # Add the marketplace | ||
| /plugin marketplace add openshift-eng/ai-helpers | ||
|
|
||
| # Install the HCP plugin | ||
| /plugin install hcp@ai-helpers | ||
|
|
||
| # Use the command | ||
| /hcp:generate aws "development cluster for API testing" | ||
| ``` | ||
|
|
||
| ### Manual Installation (Cursor) | ||
|
|
||
| ```bash | ||
| # Clone the repository | ||
| mkdir -p ~/.cursor/commands | ||
| git clone [email protected]:openshift-eng/ai-helpers.git | ||
| ln -s ai-helpers ~/.cursor/commands/ai-helpers | ||
| ``` | ||
|
|
||
| ## Common Use Cases | ||
|
|
||
| ### Development Environments | ||
| - Quick cluster setup for testing | ||
| - Cost-optimized configurations | ||
| - Single replica control planes | ||
|
|
||
| ### Production Deployments | ||
| - High-availability configurations | ||
| - Multi-zone deployments | ||
| - Auto-repair and monitoring enabled | ||
|
|
||
| ### Edge Computing | ||
| - Minimal resource footprints | ||
| - Disconnected/airgapped environments | ||
| - Agent-based deployments | ||
|
|
||
| ### Special Requirements | ||
| - FIPS compliance configurations | ||
| - IPv6 and dual-stack networking | ||
| - Custom storage and compute requirements | ||
|
|
||
| ## Architecture | ||
|
|
||
| The plugin follows a modular architecture with: | ||
|
|
||
| 1. **Main Command**: `/hcp:generate` acts as an orchestrator | ||
| 2. **Provider Skills**: Specialized implementation guidance for each provider | ||
| 3. **Interactive Workflows**: Guided parameter collection and validation | ||
| 4. **Smart Defaults**: Environment-specific best practices | ||
|
|
||
| This design ensures: | ||
| - **Single Source of Truth**: Each provider's knowledge lives in one place | ||
| - **Extensibility**: Easy to add new providers or update existing ones | ||
| - **Maintainability**: Clear separation of concerns between providers | ||
|
|
||
| ## Contributing | ||
|
|
||
| To add support for a new provider: | ||
|
|
||
| 1. Create a new skill directory: `plugins/hcp/skills/hcp-create-<provider>/` | ||
| 2. Implement the `SKILL.md` file following the established pattern | ||
| 3. Update the main command to invoke the new skill | ||
| 4. Test the implementation and add examples | ||
|
|
||
| See existing skills as reference implementations. | ||
|
|
||
| ## Support | ||
|
|
||
| - **Issues**: [GitHub Issues](https://github.com/openshift-eng/ai-helpers/issues) | ||
| - **Documentation**: [HyperShift Documentation](https://hypershift.openshift.io/) | ||
| - **Skills**: View individual skill files in `plugins/hcp/skills/` | ||
|
|
||
| ## License | ||
|
|
||
| This plugin is part of the AI Helpers project and follows the same licensing terms. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Nit, could we call the plugin "hypershift"? It'd be more discoverable
Uh oh!
There was an error while loading. Please reload this page.
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.
I was doubting that too, actually my first iteration was using hypershift but hcp was smaller and easy to remember, also the users are used to use that command outside of claude (we have 2 CLIs hypershift (dev supported) hcp (fully customer supported)). I think hcp is smaller and maybe better.
It's there any way to call the plugin hypershift at marketplace level but use the command as hcp (maybe it's confusing too)?