Skip to content

Commit cbb7032

Browse files
committed
Do not return error if secret does not exist
The non existence of the bootstrap secret should not prevent an awsMachine from being deleted
1 parent eb0195e commit cbb7032

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/awsmachine_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ func (r *AWSMachineReconciler) deleteIgnitionBootstrapDataFromS3(machineScope *s
763763
}
764764

765765
_, userDataFormat, err := machineScope.GetRawBootstrapDataWithFormat()
766-
if err != nil {
766+
if err != nil && !apierrors.IsNotFound(err) {
767767
r.Recorder.Eventf(machineScope.AWSMachine, corev1.EventTypeWarning, "FailedGetBootstrapData", err.Error())
768768
return err
769769
}

0 commit comments

Comments
 (0)