Skip to content

Commit

Permalink
improvement: use rfc339 timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
waveywaves committed Sep 11, 2023
1 parent eaeb1d9 commit f51aec2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/uffizzicluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,15 @@ func (r *UffizziClusterReconciler) reconcileSleepState(ctx context.Context, uClu
if err != nil {
return err
}
sleepingTime := metav1.Now()
sleepingTime := metav1.Now().Rfc3339Copy()
setCondition(uCluster, Sleeping(sleepingTime))
// if the current replicas is 0, then do nothing
} else if !uCluster.Spec.Sleep && *currentReplicas == 0 {
if err := r.scaleStatefulSet(ctx, ucStatefulSet, 1); err != nil {
return err
}
// set status for vcluster waking up
lastAwakeTime := metav1.Now()
lastAwakeTime := metav1.Now().Rfc3339Copy()
lastAwakeTimeString := lastAwakeTime.String()
uCluster.Status.LastAwakeTime = &lastAwakeTimeString
setCondition(uCluster, Awoken(lastAwakeTime))
Expand Down

0 comments on commit f51aec2

Please sign in to comment.