crosscloudci / cross-cloud

Cross-Cloud - multi-cloud K8s provisioner for CNCF CI Project
https://cncf.ci
Apache License 2.0
167 stars 59 forks source link

feature-request: Delayed destruction #162

Closed akutz closed 6 years ago

akutz commented 6 years ago

Hi All,

Due to some previous issues, as well as the current #161, we're trying to figure out the best method to delay the destruction of our environments. PR #154 provides the ability to destroy an environment without the need for the Terraform state, so one method would be to simply disable the destroy step for vSphere and let us manually remove resources a day or two later.

However, I think this is a feature that may also add value to other platforms. The fact is, it's hard to debug failed deployments when the resources are no longer present. Logs may be attached to those resources, and when the resources are destroyed, so too are the logs.

This is potentially a priority issue for VMware.

Thank you!

akutz commented 6 years ago

Hi All,

After a few hours round-the-bin with internal support here at VMware, they've concluded there is little they are able to do unless there are logs associated with failed deployments. I am going to submit a PR to make the destruction of vSphere environments dependent upon an environment variable. The default value will be to not destroy the environment.

taylor commented 6 years ago

Reference pull request for skipping destroy https://github.com/crosscloudci/cross-cloud/pull/163

taylor commented 6 years ago

Please change the default to be destroy.

If an environment variable VSPHERE_DESTROY_SKIP is set to true then destroy will be skipped.

Ideally this can be applied to all providers. Then we can turn on skipping cleanup when we want to debug.

Summary:

akutz commented 6 years ago

Hi @taylor,

Thank you for your feedback. Done and done. I also made it so DESTROY_SKIP is checked in case you want to generalize the feature.