-
Notifications
You must be signed in to change notification settings - Fork 300
🐛 supervisor: create ClusterModule per MachineDeployment and re-reconcile VirtualMachineResourceSetPolicy to update VirtualMachineSetResourcePolicy #3287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
/test pull-cluster-api-provider-vsphere-e2e-vcsim-govmomi-main |
/hold
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first pass
} | ||
|
||
// Ensure .spec.clusterModuleGroups is up to date. | ||
helper, err := patch.NewHelper(resourcePolicy, s.Client) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I prefer this approach (using the patch helper), but let's consider also using createOrUpdate for consistency with the rest of the codebase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code did before use createOrUpdate
, but only did run it on creation and never updated anything.
So I'd prefer using patch instead, especially because we may not want to always update everything (resourcePool and folder are immutable)
} | ||
} | ||
|
||
return errors.Errorf("VirtualMachineSetResourcePolicy's .status.clusterModules does not yet contain %s", clusterModuleGroupName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: when we look into v1beta2 conditions for CAPV, we should consider if/how to surface when machine creation is stuck due to corresponding module missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It bubbles up to InfrastructureReady
at the Machine:
Message: * VirtualMachineProvisioned: failed to create or update VirtualMachine: VirtualMachineSetResourcePolicy's .status.clusterModules does not yet contain group "quick-start-se6wwz-md-md-0-k
z75n"
Observed Generation: 2
Reason: NotReady
Status: False
Type: InfrastructureReady
e9836c6
to
6a162b0
Compare
7ed2914
to
c7718eb
Compare
c7718eb
to
e205d5b
Compare
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@chrischdi: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #