Skip to content

Commit

Permalink
Fixed duplicate key in structured log
Browse files Browse the repository at this point in the history
Signed-off-by: d-kuro <kurosawa7620@gmail.com>
  • Loading branch information
d-kuro committed Mar 9, 2022
1 parent 5c4d806 commit c4b8036
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions controllers/mysqlcluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ func (r *MySQLClusterReconciler) reconcileV1MyCnf(ctx context.Context, req ctrl.
return nil, fmt.Errorf("failed to reconcile my.cnf configmap %s/%s: %w", cluster.Namespace, cmName, err)
}

log.Info("reconciled my.cnf configmap", "name", cmName)
log.Info("reconciled my.cnf ConfigMap", "configMapName", cmName)

cms := &corev1.ConfigMapList{}
if err := r.List(ctx, cms, client.InNamespace(cluster.Namespace)); err != nil {
Expand Down Expand Up @@ -517,7 +517,7 @@ func (r *MySQLClusterReconciler) reconcileV1FluentBitConfigMap(ctx context.Conte
return fmt.Errorf("failed to reconcile configmap %s/%s for slow logs: %w", cluster.Namespace, name, err)
}

log.Info("reconciled configmap for slow logs", "name", name)
log.Info("reconciled ConfigMap for slow logs", "configMapName", name)
} else {
cm := &corev1.ConfigMap{}
cm.Namespace = cluster.Namespace
Expand Down Expand Up @@ -572,7 +572,7 @@ func (r *MySQLClusterReconciler) reconcileV1ServiceAccount(ctx context.Context,
return fmt.Errorf("failed to reconcile service account %s/%s: %w", cluster.Namespace, name, err)
}

log.Info("reconciled service account", "name", name)
log.Info("reconciled ServiceAccount", "serviceAccountName", name)

return nil
}
Expand Down Expand Up @@ -700,7 +700,7 @@ func (r *MySQLClusterReconciler) reconcileV1Service1(ctx context.Context, cluste
}
}

log.Info("reconciled service", "name", name)
log.Info("reconciled Service", "serviceName", name)

return nil
}
Expand Down Expand Up @@ -877,7 +877,7 @@ func (r *MySQLClusterReconciler) reconcileV1StatefulSet(ctx context.Context, req
}
}

log.Info("reconciled stateful set", "name", cluster.PrefixedName())
log.Info("reconciled StatefulSet", "statefulSetName", cluster.PrefixedName())

return nil
}
Expand Down Expand Up @@ -955,7 +955,7 @@ func (r *MySQLClusterReconciler) reconcileV1PDB(ctx context.Context, req ctrl.Re
}
}

log.Info("reconciled PDB", "name", pdb.Name)
log.Info("reconciled PDB", "pdbName", pdb.Name)

return nil
}
Expand Down Expand Up @@ -1173,7 +1173,7 @@ func (r *MySQLClusterReconciler) reconcileV1BackupJob(ctx context.Context, req c
}
}

log.Info("reconciled CronJob for backup", "name", cronJobName)
log.Info("reconciled CronJob for backup", "cronJobName", cronJobName)

if err := r.reconcileV1BackupJobRole(ctx, req, cluster); err != nil {
return err
Expand Down Expand Up @@ -1255,7 +1255,7 @@ func (r *MySQLClusterReconciler) reconcileV1BackupJobRole(ctx context.Context, r
}
}

log.Info("reconciled Role for backup", "name", name)
log.Info("reconciled Role for backup", "roleName", name)

return nil
}
Expand Down Expand Up @@ -1322,7 +1322,7 @@ func (r *MySQLClusterReconciler) reconcileV1BackupJobRoleBinding(ctx context.Con
}
}

log.Info("reconciled RoleBinding for backup", "name", name)
log.Info("reconciled RoleBinding for backup", "roleBindingName", name)

return nil
}
Expand Down Expand Up @@ -1477,7 +1477,7 @@ func (r *MySQLClusterReconciler) reconcileV1RestoreJob(ctx context.Context, req
}
}

log.Info("reconciled Job for restore", "name", jobName)
log.Info("reconciled Job for restore", "jobName", jobName)
}

if err := r.reconcileV1RestoreJobRole(ctx, req, cluster); err != nil {
Expand Down Expand Up @@ -1560,7 +1560,7 @@ func (r *MySQLClusterReconciler) reconcileV1RestoreJobRole(ctx context.Context,
}
}

log.Info("reconciled Role for backup", "name", name)
log.Info("reconciled Role for backup", "roleName", name)

return nil
}
Expand Down Expand Up @@ -1627,7 +1627,7 @@ func (r *MySQLClusterReconciler) reconcileV1RestoreJobRoleBinding(ctx context.Co
}
}

log.Info("reconciled RoleBinding for restore", "name", name)
log.Info("reconciled RoleBinding for restore", "roleBindingName", name)

return nil
}
Expand Down

0 comments on commit c4b8036

Please sign in to comment.