-
Notifications
You must be signed in to change notification settings - Fork 296
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
✨ Allow using moid #3229
✨ Allow using moid #3229
Conversation
8eea79f
to
bd176b0
Compare
/test help |
@chrischdi: The specified target(s) for
The following commands are available to trigger optional jobs:
Use
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. |
/test pull-cluster-api-provider-vsphere-e2e-vcsim-govmomi-main |
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.
In some cases, passing the name of an object may not be enough. There may be disambiguation problems on name usage, or special characters that are accepted by vSphere but not properly encoded to be used during VM provisioning.
This change allows users that can rely on passing MOID (eg.: automation, terraform, vSphere UI) to pass the MOID of an object instead of passing the canonical name
could you provide an example of users passing a name that doesn't work and how they would pass MOID instead?
should API field docs be updated to reflect that?
Note: This change doesn't cover yet Network Name and the Failure Domain fields, that can be either covered by this same change, or on a follow up PR.
best to include it in the same PR, IMO.
/cc @lubronzhan |
/retest |
/test pull-cluster-api-provider-vsphere-e2e-vcsim-govmomi-main |
I will add the api docs as well, didn't finished taking care of all the comments yet :) |
I will try to get to this PR soon, but currently trying to finish some work in CAPI first; in the meantime it will be great if we can add an E2E test to this PR. e.g. we can take this E2E test, duplicate it, write code that resolve names in env vars into Moid, then sets env vars with the Moid so the test will use them |
sorry folks, last 2 days were really busy. I will come back to this tomorrow as my first task :) |
will rebase over this one for the logging comments. Then add some e2e tests as proposed by Fabrizio |
@fabriziopandini just an update. Setting the e2e here is showing to be harder than I though, because in "theory" my e2e suite cannot access vcsim, which is running as a Pod on my cluster. I am not sure we are expecting this to be possible or not, but in this case I will need to, instead of making my e2e test go to vcsim and get the MOIDs, make the vcsim envvar controller to add on its status the moid instead of the name. wdyt? Which one should I follow? |
30d839e
to
3005d40
Compare
ra, running the file test errors, maybe I am using some global that is nullified after it, should check tomorrow |
ok was able to fix e2e 🥳 Now just need to check the issue on unit test and we are good to go |
e2a4173
to
2f0e18d
Compare
/test pull-cluster-api-provider-vsphere-e2e-vcsim-govmomi-main /hold cancel |
This is validated on my tests, works fine :) @sbueringer @fabriziopandini @chrischdi for final review :) Thanks! |
/test pull-cluster-api-provider-vsphere-e2e-vcsim-govmomi-main |
b630e7e
to
a0cf25d
Compare
/test pull-cluster-api-provider-vsphere-e2e-vcsim-govmomi-main |
Co-authored-by: Lubomir I. Ivanov <[email protected]>
a0cf25d
to
65efed1
Compare
/test pull-cluster-api-provider-vsphere-e2e-vcsim-govmomi-main |
Thank you very much!! Feel free to merge once tests are green /lgtm |
LGTM label has been added. Git tree hash: e1d5181ace36378d168c423d67fad302276b36f4
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer 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 |
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.
lgtm
All tests passing, removing hold Thanks all |
What this PR does / why we need it: Allow users passing MOID as part of the spec
In some cases, passing the name of an object may not be enough. There may be disambiguation problems on name usage, or special characters that are accepted by vSphere but not properly encoded to be used during VM provisioning.
This change allows users that can rely on passing MOID (eg.: automation, terraform, vSphere UI) to pass the MOID of an object instead of passing the canonical name
Note: This change doesn't cover yet Network Name and the Failure Domain fields, that can be either covered by this same change, or on a follow up PR.