-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add vSphere IPI destroy #2893
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
Add vSphere IPI destroy #2893
Conversation
|
Need to update Gopkg (will do in another commit) |
|
@patrickdillon |
|
Looks like: |
fdd7ce2 to
1c4de9a
Compare
pkg/types/vsphere/client.go
Outdated
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.
|
/retest |
patrickdillon
left a comment
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.
Currently there is no output when you run destroy at the standard log level. I left a couple of suggestions of where I definitely think we should switch debug to info but I think that is a minimum and we could be more verbose.
pkg/destroy/vsphere/vsphere.go
Outdated
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.
nit: regroup these internal imports to:
stdlib
external
internal
pkg/destroy/vsphere/vsphere.go
Outdated
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.
This output should be shown at the default log-level so virtualMachineLogger.Debug -> virtualMachineLogger.Info
pkg/destroy/vsphere/vsphere.go
Outdated
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.
.Debug -> .Info
pkg/destroy/vsphere/vsphere.go
Outdated
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.
This comment can be removed (or updated as we are using InfraID)
- Modify clustermetadata to include VSphere - Add additional fields for auth to vsphere Metadata struct that is required for accessing vSphere vCenter to destroy cluster infrastructure objects - vSphere Destroy - Create clients for both soap and rest - Finds the vCenter objects attached to the Tag - Retieve the ManagedObjects for both Folder and VirtualMachine - Confirm that exactly one Folder is available - Remove VirtualMachines that are a child of Folder - Remove Folder if empty vsphere missing metadata - Modified `pkg/asset/cluster/metadata.go` to include the vsphere case for creating the metadata asset - Created vsphere metadata function to populate metadata struct with auth from install config. Create vsphere `client.go` that contains a single function to create vSphere SOAP and REST clients that will be used for at least destroy and gather bootstrap
|
Logging changes look good to me. Now deleted resources are output: For reference, here is log with /lgtm |
|
/assign @sdodson |
|
/approve |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sdodson The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/hold |
|
/hold cancel |
|
/retest |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
21 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
that is required for accessing vSphere vCenter
to destroy cluster infrastructure objects