@@ -67,7 +67,7 @@ const (
6767// For more details, check Reconcile and its Result here:
6868// - https://pkg.go.dev/sigs.k8s.io/[email protected] /pkg/reconcile 6969func (r * S3UserReconciler ) Reconcile (ctx context.Context , req ctrl.Request ) (ctrl.Result , error ) {
70- logger := log .FromContext (ctx ). WithName ( "userCtrl" )
70+ logger := log .FromContext (ctx )
7171
7272 // Checking for userResource existence
7373 userResource := & s3v1alpha1.S3User {}
@@ -120,7 +120,7 @@ func (r *S3UserReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr
120120}
121121
122122func (r * S3UserReconciler ) handleS3ExistingUser (ctx context.Context , userResource * s3v1alpha1.S3User ) (reconcile.Result , error ) {
123- logger := log .FromContext (ctx ). WithName ( "userCtrl" )
123+ logger := log .FromContext (ctx )
124124
125125 // --- Begin Secret management section
126126
@@ -239,7 +239,7 @@ func (r *S3UserReconciler) handleS3ExistingUser(ctx context.Context, userResourc
239239}
240240
241241func (r * S3UserReconciler ) handleS3NewUser (ctx context.Context , userResource * s3v1alpha1.S3User ) (reconcile.Result , error ) {
242- logger := log .FromContext (ctx ). WithName ( "userCtrl" )
242+ logger := log .FromContext (ctx )
243243
244244 // Generating a random secret key
245245 secretKey , err := password .Generate (20 , true , false , true )
@@ -357,7 +357,7 @@ func (r *S3UserReconciler) handleS3NewUser(ctx context.Context, userResource *s3
357357}
358358
359359func (r * S3UserReconciler ) addPoliciesToUser (ctx context.Context , userResource * s3v1alpha1.S3User ) error {
360- logger := log .FromContext (ctx ). WithName ( "userCtrl" )
360+ logger := log .FromContext (ctx )
361361 policies := userResource .Spec .Policies
362362 if policies != nil {
363363 err := r .S3Client .AddPoliciesToUser (userResource .Spec .AccessKey , policies )
@@ -370,7 +370,7 @@ func (r *S3UserReconciler) addPoliciesToUser(ctx context.Context, userResource *
370370}
371371
372372func (r * S3UserReconciler ) handleS3UserDeletion (ctx context.Context , userResource * s3v1alpha1.S3User ) (reconcile.Result , error ) {
373- logger := log .FromContext (ctx ). WithName ( "userCtrl" )
373+ logger := log .FromContext (ctx )
374374
375375 if controllerutil .ContainsFinalizer (userResource , userFinalizer ) {
376376 // Run finalization logic for S3UserFinalizer. If the finalization logic fails, don't remove the finalizer so that we can retry during the next reconciliation.
@@ -397,7 +397,7 @@ func (r *S3UserReconciler) handleS3UserDeletion(ctx context.Context, userResourc
397397}
398398
399399func (r * S3UserReconciler ) getUserSecret (ctx context.Context , userResource * s3v1alpha1.S3User ) (corev1.Secret , error ) {
400- logger := log .FromContext (ctx ). WithName ( "userCtrl" )
400+ logger := log .FromContext (ctx )
401401
402402 // Listing every secrets in the S3User's namespace, as a first step
403403 // to get the actual secret matching the S3User proper.
@@ -443,7 +443,7 @@ func (r *S3UserReconciler) getUserSecret(ctx context.Context, userResource *s3v1
443443}
444444
445445func (r * S3UserReconciler ) deleteSecret (ctx context.Context , secret * corev1.Secret ) {
446- logger := log .FromContext (ctx ). WithName ( "userCtrl" )
446+ logger := log .FromContext (ctx )
447447 err := r .Delete (ctx , secret )
448448 if err != nil {
449449 logger .Error (err , "an error occurred while deleting a secret" )
@@ -492,7 +492,7 @@ func (r *S3UserReconciler) SetupWithManager(mgr ctrl.Manager) error {
492492}
493493
494494func (r * S3UserReconciler ) setS3UserStatusConditionAndUpdate (ctx context.Context , userResource * s3v1alpha1.S3User , conditionType string , status metav1.ConditionStatus , reason string , message string , srcError error ) (ctrl.Result , error ) {
495- logger := log .FromContext (ctx ). WithName ( "userCtrl" )
495+ logger := log .FromContext (ctx )
496496
497497 // We moved away from meta.SetStatusCondition, as the implementation did not allow for updating
498498 // lastTransitionTime if a Condition (as identified by Reason instead of Type) was previously
@@ -524,7 +524,7 @@ func (r *S3UserReconciler) finalizeS3User(userResource *s3v1alpha1.S3User) error
524524// newSecretForCR returns a secret with the same name/namespace as the CR.
525525// The secret will include all labels and annotations from the CR.
526526func (r * S3UserReconciler ) newSecretForCR (ctx context.Context , userResource * s3v1alpha1.S3User , data map [string ][]byte ) (* corev1.Secret , error ) {
527- logger := log .FromContext (ctx ). WithName ( "userCtrl" )
527+ logger := log .FromContext (ctx )
528528
529529 labels := map [string ]string {}
530530 for k , v := range userResource .ObjectMeta .Labels {
0 commit comments