Skip to content

Commit

Permalink
List synthesizer pod in pod namespace only (#258)
Browse files Browse the repository at this point in the history
Following the RBAC rules to list the synthesizer pod in its namespace
ony.
  • Loading branch information
chihshenghuang authored Jan 6, 2025
1 parent acbf639 commit 59cc032
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/controllers/synthesis/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (c *podLifecycleController) Reconcile(ctx context.Context, req ctrl.Request
// Confirm that a pod doesn't already exist for this synthesis without trusting informers.
// This protects against cases where synthesis has recently started and something causes
// another tick of this loop before the pod write hits the informer.
err = c.noCacheReader.List(ctx, pods, client.MatchingLabels{
err = c.noCacheReader.List(ctx, pods, client.InNamespace(c.config.PodNamespace), client.MatchingLabels{
"eno.azure.io/synthesis-uuid": comp.Status.CurrentSynthesis.UUID,
})
if err != nil {
Expand Down

0 comments on commit 59cc032

Please sign in to comment.