Skip to content

Commit cda13df

Browse files
Merge pull request #254 from jacobweinstock/clusterrole
Add namespace to Task listing: ## Description <!--- Please describe what this PR is going to change --> This is needed so that Rufio deployed with ClusterRole will look at the correct and corresponding Tasks. All other client calls appear to have name spacing properly set. ## Why is this needed <!--- Link to issue you have raised --> Fixes: # ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## How are existing users impacted? What migration steps/scripts do we need? <!--- Fixes a bug, unblocks installation, removes a component of the stack etc --> <!--- Requires a DB migration script, etc. --> ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
2 parents 6180ef3 + a4bdbf5 commit cda13df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controller/job.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (r *JobReconciler) doReconcile(ctx context.Context, job *v1alpha1.Job, jobP
107107

108108
// List all Task owned by Job
109109
tasks := &v1alpha1.TaskList{}
110-
err = r.client.List(ctx, tasks, client.MatchingFields{jobOwnerKey: job.Name})
110+
err = r.client.List(ctx, tasks, client.MatchingFields{jobOwnerKey: job.Name}, client.InNamespace(job.Namespace))
111111
if err != nil {
112112
return ctrl.Result{}, fmt.Errorf("failed to list owned Tasks for Job %s/%s: %w", job.Namespace, job.Name, err)
113113
}

0 commit comments

Comments
 (0)