Bug 86417: installer: sync MAPI master machine edits to CAPI AWSMachine manifests#10568
Bug 86417: installer: sync MAPI master machine edits to CAPI AWSMachine manifests#10568chdeshpa-hue wants to merge 1 commit into
Conversation
…ne manifests On AWS 4.22+ (CAPI-based IPI), control plane EC2 instances are provisioned from cluster-api/machines/ AWSMachine objects, not from MAPI Machine objects in openshift/. The two asset generators (machines.Master and machines.ClusterAPI) are independent siblings — neither depends on the other. Users who edit openshift/ master manifests after "create manifests" but before "create cluster" experience silent misconfiguration: their edits are ignored and masters are provisioned with defaults. This adds a MasterMAPISync asset that: 1. Compares provisioning-relevant fields between MAPI and CAPI master machines 2. Warns on detected drift with per-field detail 3. Syncs MAPI values to CAPI objects before infrastructure provisioning Fields synced: instanceType, AMI, rootVolume (size/type/IOPS/throughput/ encryptionKey), IAM instance profile, IMDS httpTokens, confidentialCompute, publicIP, subnet (ID or filters). Platform scope: AWS only. Follow-up PRs will extend to GCP/Azure. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
|
Hi @chdeshpa-hue. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Summary
MasterMAPISyncasset that detects drift between MAPI master machine manifests (openshift/) and CAPI AWSMachine manifests (cluster-api/machines/) duringcreate clusteropenshift/master manifests aftercreate manifestsbut edits are ignored because CAPI machines are provisioned fromcluster-api/machines/Bug
https://redhat.atlassian.net/browse/OCPBUGS-86417
Changes
pkg/asset/machines/mastermapisync.goMasterMAPISyncasset — compares MAPI and CAPI master specs, warns on drift, syncs fieldspkg/asset/machines/mastermapisync_test.gopkg/asset/cluster/cluster.go&machines.MasterMAPISync{}toCluster.Dependencies()How it works
The
MasterMAPISyncasset:InstallConfig,Master, andClusterAPIAWSMachineProviderConfigfrom each MAPI machineAWSMachinein CAPI by name/indexFields synced: instanceType, AMI, rootVolume (size/type/IOPS/throughput/encryptionKey), IAM instance profile, IMDS httpTokens, confidentialCompute, publicIP, subnet (ID or filters).
Platform scope: AWS only. Follow-up PRs extend to GCP/Azure.
Test plan
go test ./pkg/asset/machines/ -run "TestSyncAWSFields|TestIndexAWSMachines|TestFindAWSMachine"Workaround (for unpatched versions)
Set values in
install-config.yamlbeforecreate manifests, or aftercreate manifestsedit bothopenshift/andcluster-api/machines/manifests.Made with Cursor