[ARO-24603] Make operator machine VM validation CI-aware#4780
Closed
tuxerrante wants to merge 11 commits intotuxerrante/min-vm-sizes-on-top-of-4594from
Closed
[ARO-24603] Make operator machine VM validation CI-aware#4780tuxerrante wants to merge 11 commits intotuxerrante/min-vm-sizes-on-top-of-4594from
tuxerrante wants to merge 11 commits intotuxerrante/min-vm-sizes-on-top-of-4594from
Conversation
Introduces pkg/api/util/vms/ with canonical VMSize type, size constants, supported size maps (production and testing/CI), and CI candidate selection via shuffleByCoreTier to spread quota pressure across families. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move VM size types and constants from api/openshiftcluster.go and admin/openshiftcluster.go into the new vms package. Simplify validate/vm.go by delegating to vms maps. Update Static() validator interface to replace requireD2sWorkers bool with isCI bool, and update all 11 API version implementations, convert files, and tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… IsCI Remove the FeatureRequireD2sWorkers feature flag and replace all callers with env.IsCI(). Update frontend, operator, cluster tooling, and clusterdata packages to use vms.VMSize types and the new Static() validator signature. Use vms.GetCICandidateMasterVMSizes() and vms.GetCICandidateWorkerVMSizes() with shuffle-by-core-tier for cost-effective quota spreading in CI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update adding-new-instance-types.md to point to pkg/api/util/vms/ as the new location for VM size definitions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cover the centralized VM-size helpers, CI-only validator paths, and cluster config/enricher behavior so the rebased stack has stronger regression protection before the follow-up fixes. Made-with: Cursor
Restore the previous fail-closed behavior so malformed or empty cluster versions cannot bypass VM-size validation for otherwise-supported SKUs. Made-with: Cursor
Restore the workload-identity early return so delete flows do not dereference service-principal clients for clusters that no longer use that cleanup path. Made-with: Cursor
Use the testing VM-size tables for admin validation and discovery in CI so resize and preflight endpoints stay aligned with the create/update paths on this rebased stack. Made-with: Cursor
Move the copyright/license header before imports to match repo convention. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Remove outdated MAITIU TODO (fields are actively used) and fix "roleassignments" → "role assignments" spacing in log message. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Use the reconciler's local development flag when validating operator machine VM sizes so CI/E2E clusters can accept testing-only worker SKUs instead of reporting false invalid-size errors. Made-with: Cursor
3139ec8 to
287f6d6
Compare
|
Please rebase pull request. |
Collaborator
|
Maybe I’m reading this wrong, but this looks like a little more than the operator reconcile-path change called out in the summary. The old worker validation path only special-cased |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
r.isLocalDevelopmentModewhen validating operator machine provider-spec VM sizes instead of hard-coding the production-only pathStandard_D2s_v3Test plan
go test ./pkg/operator/controllers/machine/...make fmtmake unit-test-goMade with Cursor