bugfix: move aws s3 log level entry to not get logged unless ignition is used
@@ -760,8 +760,6 @@ func (r *AWSMachineReconciler) deleteIgnitionBootstrapDataFromS3(machineScope *s
return nil
}
- machineScope.Info("Deleting unneeded entry from AWS S3", "secretPrefix", machineScope.GetSecretPrefix())
-
_, userDataFormat, err := machineScope.GetRawBootstrapDataWithFormat()
if err != nil {
r.Recorder.Eventf(machineScope.AWSMachine, corev1.EventTypeWarning, "FailedGetBootstrapData", err.Error())
@@ -772,6 +770,8 @@ func (r *AWSMachineReconciler) deleteIgnitionBootstrapDataFromS3(machineScope *s
return nil
}
+ machineScope.Info("Deleting unneeded entry from AWS S3", "secretPrefix", machineScope.GetSecretPrefix())
+
if err := objectStoreSvc.Delete(machineScope); err != nil {
return errors.Wrap(err, "deleting bootstrap data object")
}
