Skip to content

Commit

Permalink
Merge pull request #1533 from calmkart/master
Browse files Browse the repository at this point in the history
FIX: fix for controller-runtime 0.6.0 GetFieldIndexer().IndexField ctx param
  • Loading branch information
k8s-ci-robot committed May 29, 2020
2 parents c373ad5 + 43b7fec commit 9eb8673
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 9eb8673

Please sign in to comment.