Skip to content

Commit

Permalink
FIX: fix for controller-runtime 0.6.0 GetFieldIndexer().IndexField ct…
Browse files Browse the repository at this point in the history
…x param
  • Loading branch information
calmkart committed May 29, 2020
1 parent 2525aeb commit 43b7fec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ func (r *CronJobReconciler) SetupWithManager(mgr ctrl.Manager) error {
r.Clock = realClock{}
}

if err := mgr.GetFieldIndexer().IndexField(&kbatch.Job{}, jobOwnerKey, func(rawObj runtime.Object) []string {
if err := mgr.GetFieldIndexer().IndexField(context.Background(), &kbatch.Job{}, jobOwnerKey, func(rawObj runtime.Object) []string {
// grab the job object, extract the owner...
job := rawObj.(*kbatch.Job)
owner := metav1.GetControllerOf(job)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ func (r *CronJobReconciler) SetupWithManager(mgr ctrl.Manager) error {
r.Clock = realClock{}
}

if err := mgr.GetFieldIndexer().IndexField(&kbatch.Job{}, jobOwnerKey, func(rawObj runtime.Object) []string {
if err := mgr.GetFieldIndexer().IndexField(context.Background(), &kbatch.Job{}, jobOwnerKey, func(rawObj runtime.Object) []string {
// grab the job object, extract the owner...
job := rawObj.(*kbatch.Job)
owner := metav1.GetControllerOf(job)
Expand Down

0 comments on commit 43b7fec

Please sign in to comment.