Skip to content

HIVE-2391: vsphere zonal#2851

Open
2uasimojo wants to merge 2 commits intoopenshift:masterfrom
2uasimojo:HIVE-2391/vsphere-zonal
Open

HIVE-2391: vsphere zonal#2851
2uasimojo wants to merge 2 commits intoopenshift:masterfrom
2uasimojo:HIVE-2391/vsphere-zonal

Conversation

@2uasimojo
Copy link
Member

Co-Authored-By: @dlom

@openshift-ci openshift-ci bot requested review from dlom and suhanime February 10, 2026 22:10
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 10, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 2uasimojo

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 10, 2026
@2uasimojo 2uasimojo changed the title Hive 2391: vsphere zonal HIVE2391: vsphere zonal Feb 10, 2026
@2uasimojo 2uasimojo changed the title HIVE2391: vsphere zonal HIVE-2391: vsphere zonal Feb 10, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 10, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 10, 2026

@2uasimojo: This pull request references HIVE-2391 which is a valid jira issue.

Details

In response to this:

Co-Authored-By: @dlom

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 openshift-eng/jira-lifecycle-plugin repository.

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 21.28713% with 159 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.21%. Comparing base (9f19259) to head (0746f91).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
contrib/pkg/createcluster/create.go 0.00% 48 Missing ⚠️
pkg/controller/utils/credentials.go 0.00% 23 Missing ⚠️
.../clusterdeployment/clusterdeployment_controller.go 0.00% 20 Missing and 1 partial ⚠️
contrib/pkg/deprovision/vsphere.go 0.00% 13 Missing ⚠️
pkg/creds/vsphere/vsphere.go 0.00% 13 Missing ⚠️
...g/controller/clusterpool/clusterpool_controller.go 0.00% 10 Missing and 1 partial ⚠️
pkg/installmanager/installmanager.go 0.00% 8 Missing ⚠️
pkg/install/generate.go 0.00% 6 Missing ⚠️
...s/hive/v1/clusterpool_validating_admission_hook.go 0.00% 4 Missing and 1 partial ⚠️
pkg/controller/utils/vsphereutils/vsphere.go 77.77% 2 Missing and 2 partials ⚠️
... and 3 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2851      +/-   ##
==========================================
- Coverage   50.30%   50.21%   -0.09%     
==========================================
  Files         280      281       +1     
  Lines       34309    34318       +9     
==========================================
- Hits        17258    17232      -26     
- Misses      15690    15723      +33     
- Partials     1361     1363       +2     
Files with missing lines Coverage Δ
pkg/clusterresource/vsphere.go 88.05% <100.00%> (-2.07%) ⬇️
...hift/hive/apis/hive/v1/clusterdeprovision_types.go 0.00% <ø> (ø)
pkg/controller/machinepool/vsphereactuator.go 68.00% <86.66%> (-5.57%) ⬇️
.../v1/clusterdeployment_validating_admission_hook.go 85.44% <71.42%> (+0.71%) ⬆️
...oller/clusterdeployment/installconfigvalidation.go 91.66% <40.00%> (-8.34%) ⬇️
pkg/controller/utils/vsphereutils/vsphere.go 77.77% <77.77%> (ø)
...s/hive/v1/clusterpool_validating_admission_hook.go 78.08% <0.00%> (-2.77%) ⬇️
pkg/install/generate.go 45.56% <0.00%> (-0.29%) ⬇️
pkg/installmanager/installmanager.go 35.63% <0.00%> (-0.14%) ⬇️
...g/controller/clusterpool/clusterpool_controller.go 58.69% <0.00%> (-0.37%) ⬇️
... and 5 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@2uasimojo 2uasimojo force-pushed the HIVE-2391/vsphere-zonal branch from 29af27f to 5249404 Compare February 11, 2026 18:20
@2uasimojo
Copy link
Member Author

@jianping-shu this passed e2e-vsphere, so I reckon it's probably ready for you to take another stab at it!

@2uasimojo
Copy link
Member Author

/hold

Looks like I missed refactoring the preflight auth check for the new creds shape.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 13, 2026
@2uasimojo 2uasimojo force-pushed the HIVE-2391/vsphere-zonal branch from 5249404 to 39cf13e Compare February 13, 2026 20:21
@2uasimojo
Copy link
Member Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 13, 2026
// Topology is the vSphere topology that will be used for virtual machines.
// If it is not present, a default value will be used.
// +optional
Topology *vsphere.Topology `json:"topology,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Part of the reason I switched to Topology here is that someone requested a "Folder" field (and it was present (alongside ResourcePool and TagIDs) on the Topology struct)

Copy link
Contributor

Choose a reason for hiding this comment

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

That is to say, this object should grow at least a Folder field (and override as necessary) alongside some of the other topology fields

Copy link
Member Author

Choose a reason for hiding this comment

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

As discussed offline:

In its current form, this PR is only keeping the overrides that already existed in the API. If we need to support more overrides and/or move the existing ones to per-fd-capable, we should do that under a separate card/PR.

If you can dig up "someone requested", let's get it into a new card.

Meanwhile, do you agree/accept leaving this as is?

@@ -81,7 +81,7 @@ func validateVSphereMachineSets(t *testing.T, mSets []*machineapi.MachineSet, ex
assert.Equal(t, int32(4), vsphereProvider.NumCPUs, "unexpected NumCPUs")
assert.Equal(t, int32(4), vsphereProvider.NumCoresPerSocket, "unexpected NumCoresPerSocket")
assert.Equal(t, int32(512), vsphereProvider.DiskGiB, "unexpected DiskGiB")
Copy link
Contributor

Choose a reason for hiding this comment

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

Per note near the top: we should be able to override the folder of the generated machineset

@dlom
Copy link
Contributor

dlom commented Feb 18, 2026

The new multi-creds changes LGTM. My only concern (as noted in review comments) is that there are some additional fields (at least Folder, potentially more) on the machinepool that end users may want to use

@2uasimojo 2uasimojo force-pushed the HIVE-2391/vsphere-zonal branch from 39cf13e to 896e851 Compare February 19, 2026 22:49
@2uasimojo
Copy link
Member Author

/hold for QE

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 19, 2026
@2uasimojo 2uasimojo force-pushed the HIVE-2391/vsphere-zonal branch from 896e851 to 7996e22 Compare February 26, 2026 15:21
@2uasimojo
Copy link
Member Author

2uasimojo commented Feb 26, 2026

/test e2e security

e2e: infra flake
security: upstream bug with the packageURL check again (though possibly slightly different this time).

@2uasimojo
Copy link
Member Author

Allowable to override security job (buggy upstream tool) if necessary when ready to merge.

}
if vsphere.DefaultDatastore == "" {
allErrs = append(allErrs, field.Required(vspherePath.Child("defaultDatastore"), "must specify vSphere defaultDatastore"))
if len(vsphere.Infrastructure.VCenters) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to check if vsphere.Infrastructure != nil firstly, the CD with deprecated fields only doesn't have infrastructure.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good find @jianping-shu.

I actually think we want to loosen this check a bit. If I understand Mark's code, it'll upconvert the CD platform section to the new shape... but only after it has already been stored in etcd*. I.e. when we hit this admission hook, it is possible and allowable for the CR to be in the old shape.

@dlom do you agree?

*Side note: a mutating webhook might have been appropriate instead -- though I'm not sure how that works for legacy-shape CRs already in etcd.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is done.

@2uasimojo 2uasimojo force-pushed the HIVE-2391/vsphere-zonal branch from 7996e22 to 066a4e4 Compare February 27, 2026 16:46
@2uasimojo 2uasimojo force-pushed the HIVE-2391/vsphere-zonal branch from 066a4e4 to ca2765c Compare March 2, 2026 22:30
@2uasimojo
Copy link
Member Author

/test coverage

that's a weird one.

Followon addressing review from openshift#2731.

MachinePool:
- Removed `Topology` override
- Restored ResourcePool and TagIDs overrides

Deprovision:
- Changed `--vsphere-vcenter` StringVar to `--vsphere-vcenters`
  StringSliceVar

Platform Creds:
- Redesigned to take `vcenters`, a list of vcenter
  server/username/password, matching (and unmarshaling into) the
  corresponding chunk of metadata.json.

Docs:
- Updated install-config sample to zonal shape.
- Documented new creds shape.
@2uasimojo 2uasimojo force-pushed the HIVE-2391/vsphere-zonal branch from ca2765c to 0746f91 Compare March 5, 2026 17:45
@2uasimojo
Copy link
Member Author

/test e2e

Actual test passed; infra flake during must-gather.

security is same old same old, override when needed.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 6, 2026

@2uasimojo: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/security 0746f91 link true /test security

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants