@@ -22,6 +22,7 @@ import (
22
22
"github.com/tiny-systems/module/internal/scheduler"
23
23
"github.com/tiny-systems/module/module"
24
24
"k8s.io/apimachinery/pkg/api/errors"
25
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
25
26
"k8s.io/apimachinery/pkg/runtime"
26
27
"k8s.io/apimachinery/pkg/types"
27
28
"k8s.io/client-go/tools/record"
@@ -34,6 +35,7 @@ import (
34
35
"sigs.k8s.io/controller-runtime/pkg/log"
35
36
"sigs.k8s.io/controller-runtime/pkg/predicate"
36
37
"sigs.k8s.io/controller-runtime/pkg/reconcile"
38
+ "time"
37
39
)
38
40
39
41
// TinyNodeReconciler reconciles a TinyNode object
@@ -102,6 +104,9 @@ func (r *TinyNodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c
102
104
status .Error = false
103
105
status .Status = ""
104
106
107
+ t := v1 .NewTime (time .Now ())
108
+
109
+ status .LastUpdateTime = & t
105
110
// upsert in scheduler
106
111
// todo add app level context
107
112
err = r .Scheduler .Update (context .Background (), node )
@@ -119,7 +124,9 @@ func (r *TinyNodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c
119
124
return reconcile.Result {}, err
120
125
}
121
126
122
- return ctrl.Result {}, nil
127
+ return ctrl.Result {
128
+ RequeueAfter : time .Minute * 15 ,
129
+ }, nil
123
130
}
124
131
125
132
// SetupWithManager sets up the controller with the Manager.
0 commit comments