Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add controller (2) - update Status/observed state
  • Loading branch information
an3l committed Dec 19, 2021
1 parent 61805b2 commit 9e89a5e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion controllers/mariadb_controller.go
Expand Up @@ -63,8 +63,14 @@ func (r *MariaDBReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
log.Error(err, "unable to fetch MariaDB")
return ctrl.Result{}, err
}
app.Status.DbState = mariak8gv1alpha1.RunningStatusPhase
if err := r.Status().Update(ctx, &app); err != nil {
log.Error(err, "unable to update the variable status")
return ctrl.Result{}, err
}

log.Info("Reconciled MariaDB kind", "mariadb", app.Name, "status", app.Status)

log.Info("Reconciled MariaDB kind", "mariadb", app.Name)
return ctrl.Result{}, nil
}

Expand Down

0 comments on commit 9e89a5e

Please sign in to comment.