-
Notifications
You must be signed in to change notification settings - Fork 131
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
vSphere: support for VM Groups #1847
vSphere: support for VM Groups #1847
Conversation
Signed-off-by: Waleed Malik <ahmedwaleedmalik@gmail.com>
acf70b4
to
f584fc9
Compare
vSphere tests are supposed to be fixed in #1844. So we'll need to override them in this PR so that I can continue with the implementation in KKP and dashboard.
|
Signed-off-by: Waleed Malik <ahmedwaleedmalik@gmail.com>
/approve |
LGTM label has been added. Git tree hash: 1a7546c882ef3e0282d81c7f3d329b065b66a144
|
/override pull-machine-controller-e2e-vsphere |
@xrstf: Overrode contexts on behalf of xrstf: pull-machine-controller-e2e-vsphere In response to this:
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. |
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.
Some nits, feel free to leave for a follow up if you think it's needed.
return fmt.Errorf("cluster is required for vm group") | ||
} | ||
|
||
if config.Cluster != "" { |
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.
Is there a way that we validate the VMGroup exist?
if config.VMAntiAffinity && config.Cluster == "" { | ||
return fmt.Errorf("cluster is required for vm anti affinity") | ||
} else if config.VMGroup != "" && config.Cluster == "" { | ||
return fmt.Errorf("cluster is required for vm group") | ||
} |
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.
What if both VMAntiAffinity and VMGroup are set, is that supported?
}, | ||
} | ||
|
||
log.Debugf("Adding VM %s in VM group %s", machine.Name, config.VMGroup) |
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.
Technically if something went wrong on vSphere side, this could result in adding multiple VMs to the group at the same time. We should eventually improve logging to reflect that edge case.
/approve |
/hold for comments |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahmedwaleedmalik, mohamed-rafraf, xrstf The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/unhold |
What this PR does / why we need it:
This PR adds support for adding VMs to pre-defined VM groups. This is useful for VM placement as host rules can be created for VM groups in vSphere.
Which issue(s) this PR fixes:
Fixes #1846
What type of PR is this?
/kind feature
Special notes for your reviewer:
Does this PR introduce a user-facing change? Then add your Release Note here:
Documentation: