Skip to content

Commit

Permalink
Merge pull request #254 from jacobweinstock/clusterrole
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jacobweinstock authored Oct 15, 2024
2 parents 6180ef3 + a4bdbf5 commit cda13df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (r *JobReconciler) doReconcile(ctx context.Context, job *v1alpha1.Job, jobP

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

0 comments on commit cda13df

Please sign in to comment.