Converting logging enums to constants

This commit is contained in:
jillianwilson
2023-08-03 15:39:33 -03:00
parent 5c41962aea
commit d3d0cfa281
5 changed files with 11 additions and 13 deletions

View File

@@ -74,7 +74,7 @@ type DeploymentReconciler struct {
// - https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/reconcile
func (r *DeploymentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
reqLogger := logDeployment.WithValues("Request.Namespace", req.Namespace, "Request.Name", req.Name)
reqLogger.V(int(logs.DebugLevel)).Info("Reconciling Deployment")
reqLogger.V(logs.DebugLevel).Info("Reconciling Deployment")
deployment := &appsv1.Deployment{}
err := r.Get(context.Background(), req.NamespacedName, deployment)
@@ -87,7 +87,7 @@ func (r *DeploymentReconciler) Reconcile(ctx context.Context, req ctrl.Request)
annotations, annotationsFound := op.GetAnnotationsForDeployment(deployment, r.OpAnnotationRegExp)
if !annotationsFound {
reqLogger.V(int(logs.DebugLevel)).Info("No 1Password Annotations found")
reqLogger.V(logs.DebugLevel).Info("No 1Password Annotations found")
return ctrl.Result{}, nil
}