Skip to content
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

ignore vspheredeploymentzone for vspherevm #14

Open
wants to merge 1 commit into
base: spectro-v1alpha4
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions controllers/vspherevm_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ func (r vmReconciler) Reconcile(ctx goctx.Context, req ctrl.Request) (_ ctrl.Res
if err := r.Client.Get(r, apitypes.NamespacedName{Name: *failureDomain}, vsphereFailureDomain); err != nil {
if apierrors.IsNotFound(err) && !vsphereVM.GetDeletionTimestamp().IsZero() {
r.Logger.Info("we got deleting machine with missing failure domain go ahead")
} else if apierrors.IsNotFound(err) {
// even after v1alpha4 upgrae we decided to keep
// old failuredomains in machinedeployments
// so skip if failuredomain not found
r.Logger.Info("failuredomain not found skip for non controlplane mahcines", "vm", vsphereVM.GetName(), "failuredomain", failureDomain)
} else {
return reconcile.Result{}, errors.Wrapf(err, "failed to find vsphere failure domain %s", *failureDomain)
}
Expand Down