fix(cli): add --service-publishing-strategy flag to hcp create cluster agent#8985
fix(cli): add --service-publishing-strategy flag to hcp create cluster agent#8985ketanvyas21 wants to merge 1 commit into
Conversation
…r agent The hcp create cluster agent command unconditionally configured all services with NodePort publishing, despite LoadBalancer being the documented preferred method for bare metal environments. Users wanting LoadBalancer had to render YAML and manually edit the manifest. Add a --service-publishing-strategy flag (NodePort|LoadBalancer) that defaults to NodePort for backward compatibility. When LoadBalancer is selected, APIServer uses LoadBalancer and other services use Route, matching the pattern used by other platforms. Signed-off-by: Ketan Vyas <kvyas@redhat.com> Assisted-by: Claude Opus 4.6 (via Cursor) Co-authored-by: Cursor <cursoragent@cursor.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ketanvyas21 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughCluster creation now supports Sequence Diagram(s)sequenceDiagram
participant CLI
participant RawCreateOptions
participant ValidatedCreateOptions
participant CreateOptions
participant ClusterSpec
CLI->>RawCreateOptions: Set service publishing strategy
RawCreateOptions->>ValidatedCreateOptions: Validate strategy and API server address
ValidatedCreateOptions->>CreateOptions: Complete with external DNS domain
CreateOptions->>ClusterSpec: Apply NodePort or LoadBalancer service mapping
🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8985 +/- ##
=======================================
Coverage 43.67% 43.68%
=======================================
Files 771 771
Lines 95840 95858 +18
=======================================
+ Hits 41862 41876 +14
- Misses 51067 51071 +4
Partials 2911 2911
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@ketanvyas21: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Summary
--service-publishing-strategyflag tohcp create cluster agentsupportingNodePort(default, backward-compatible) andLoadBalanceroptionsLoadBalanceris selected, APIServer uses LoadBalancer and OAuthServer/Konnectivity/Ignition use Route, matching the documented preferred method for bare metal--api-server-addresswith LoadBalancer strategy, auto-detects address only for NodePortFixes OCPBUGS-97942
Test plan
TestRawCreateOptions_Validatewith 4 cases covering validation logicTestCreateClustercase for LoadBalancer strategy rendering with fixturemake lint-fixpasses with 0 issuesMade with Cursor
Summary by CodeRabbit
New Features
--service-publishing-strategycommand-line option.Bug Fixes