Update consts in Azure SQL controller finalizer
@@ -20,6 +20,7 @@ import (
"context"
"fmt"
+ v1 "k8s.io/api/core/v1"
azurev1alpha1 "github.com/Azure/azure-service-operator/api/v1alpha1"
helpers "github.com/Azure/azure-service-operator/pkg/helpers"
)
@@ -29,8 +30,8 @@ const AzureSQLServerFinalizerName = "azuresqlserver.finalizers.azure.com"
func (r *AzureSqlServerReconciler) addFinalizer(instance *azurev1alpha1.AzureSqlServer) error {
helpers.AddFinalizer(instance, AzureSQLServerFinalizerName)
if updateerr := r.Update(context.Background(), instance); updateerr != nil {
- r.Recorder.Event(instance, "Warning", "Failed", "Failed to update finalizer")
+ r.Recorder.Event(instance, v1.EventTypeWarning, "Failed", "Failed to update finalizer")
}
- r.Recorder.Event(instance, "Normal", "Updated", fmt.Sprintf("finalizer %s added", AzureSQLServerFinalizerName))
+ r.Recorder.Event(instance, v1.EventTypeNormal, "Updated", fmt.Sprintf("finalizer %s added", AzureSQLServerFinalizerName))
return nil
}
