ROSAENG-8272 | feat: add HCP spot CLI support #3457
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3457"
general
weight: 0.35
davidleerh
PR Summary
Add ROSA HCP Spot CLI support for both Simple and Enhanced modes. Spot node pools are created with
--use-spot-instancesand optionally--spot-max-priceat machine pool creation time. Spot configuration is immutable after creation — users must delete and recreate the machine pool to change spot settings. A newrosa create spot-termination-queuehelper provisions the AWS resources for graceful interruption handling. Cluster describe only shows the queue URL when configured, avoiding ambiguous mode display.Detailed Description of the Issue
ROSA HCP Spot support needs CLI changes across three user flows:
1. Creating HCP node pools with spot market options —
--use-spot-instancesand--spot-max-priceflags onrosa create machinepool2. Configuring the cluster-level termination-handler queue URL —
--spot-termination-queue-urlonrosa create clusterandrosa edit cluster3. Helping users create the AWS queue/rule/policy resources —
rosa create spot-termination-queuehelper commandPrior to this change, the CLI exposed classic spot behavior but not the HCP node-pool API shape, could not set
aws.termination_handler_queue_url, did not surface backend Simple-mode warnings, and had no supported helper for the AWS resource setup.Key behaviors:
Spot Termination Queue URL: <url>when configured. No output when no queue is set (avoids ambiguity between on-demand and Simple mode).Related Issues and PRs
- openshift-online/ocm-api-model#1178 (SDK changes)
- uhc-clusters-service!11497 (Simple mode)
- uhc-clusters-service!11523 (Enhanced mode)
- openshift/rosa#3463 (SDK bump, merged)
- Backend DDR
Type of Change
Previous Behavior
--spot-termination-queue-urlflag on cluster create/edit.Behavior After This Change
rosa create machinepool --use-spot-instances [--spot-max-price <price>]creates HCP Spot node pools.rosa create cluster --spot-termination-queue-url <url>androsa edit cluster --spot-termination-queue-url <url>configure the cluster queue.rosa create spot-termination-queue --name <prefix> --nodepool-management-role-arn <arn>creates AWS resources and returns the queue URL.rosa describe clustershowsSpot Termination Queue URL: <url>only when configured.rosa describe machinepool/rosa list machinepoolsshows Spot status.How to Test (Step-by-Step)
Preconditions
go.modrequirement.Test Steps
1.
make install-hooks2.
make fmt3.
make test4.
make pre-push-checks5. Optionally verify with
rosa create cluster --help,rosa edit cluster --help,rosa create machinepool --help,rosa create spot-termination-queue --helpExpected Results
Proof of the Fix
make pre-push-checkspassesBreaking Changes
Developer Verification Checklist
[JIRA-TICKET] | [TYPE]: <MESSAGE>.make install-hookshas been run in this clone.make testpasses.make lintpasses.make rosapasses.Known Limitations
aws_node_pool.spot_market_optionsin staging. The CLI sends the request through without local guards, so the user sees the backend's actual error if the path becomes available in a future backend release.[ROSAENG-8272]: https://redhat.atlassian.net/browse/ROSAENG-8272?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ