@@ -35,8 +35,8 @@ import (
35
35
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;update;patch
36
36
37
37
const (
38
- operatorAnnotation = "auto.request.operator /optimize"
39
- operatorModeAnnotation = "auto.request.operator /mode"
38
+ operatorAnnotation = "reqsizer.jatalocks.github.io /optimize"
39
+ operatorModeAnnotation = "reqsizer.jatalocks.github.io /mode"
40
40
)
41
41
42
42
func cacheKeyFunc (obj interface {}) (string , error ) {
@@ -205,7 +205,7 @@ func (r *PodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.R
205
205
}
206
206
}
207
207
if PodChange {
208
- pod .Annotations ["auto.request.operator /changed" ] = "true"
208
+ pod .Annotations ["reqsizer.jatalocks.github.io /changed" ] = "true"
209
209
log .Info ("Pod Requests Will Change" )
210
210
211
211
if len (pod .OwnerReferences ) == 0 {
@@ -231,7 +231,7 @@ func (r *PodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.R
231
231
return ctrl.Result {}, err
232
232
}
233
233
UpdatePodController (& deployment .Spec .Template .Spec , Requests , ctx )
234
- deployment .Annotations ["auto.request.operator /changed" ] = "true"
234
+ deployment .Annotations ["reqsizer.jatalocks.github.io /changed" ] = "true"
235
235
236
236
return r .UpdateKubeObject (deployment , ctx )
237
237
} else {
@@ -248,7 +248,7 @@ func (r *PodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.R
248
248
return ctrl.Result {}, err
249
249
}
250
250
UpdatePodController (& deployment .Spec .Template .Spec , Requests , ctx )
251
- deployment .Annotations ["auto.request.operator /changed" ] = "true"
251
+ deployment .Annotations ["reqsizer.jatalocks.github.io /changed" ] = "true"
252
252
return r .UpdateKubeObject (deployment , ctx )
253
253
case "StatefulSet" :
254
254
log .Info ("Is Owned by StatefulSet" )
@@ -261,7 +261,7 @@ func (r *PodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.R
261
261
}
262
262
263
263
UpdatePodController (& deployment .Spec .Template .Spec , Requests , ctx )
264
- deployment .Annotations ["auto.request.operator /changed" ] = "true"
264
+ deployment .Annotations ["reqsizer.jatalocks.github.io /changed" ] = "true"
265
265
return r .UpdateKubeObject (deployment , ctx )
266
266
default :
267
267
fmt .Printf ("Could not find resource manager for type %s\n " , pod .OwnerReferences [0 ].Kind )
0 commit comments