Skip to content

Commit

Permalink
chore(backport release-1.2): fix(api): fix list ops in authorizing cl…
Browse files Browse the repository at this point in the history
…ient (#3397)

Co-authored-by: Kent Rancourt <kent.rancourt@gmail.com>
  • Loading branch information
akuitybot and krancour authored Jan 29, 2025
1 parent 2047a24 commit 9caa63f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/api/kubernetes/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@ func (c *client) List(
key.Namespace = string(n)
break
}
if clOpt, ok := opt.(*libClient.ListOptions); ok {
key.Namespace = clOpt.Namespace
break
}
}
client, err := c.getAuthorizedClientFn(
ctx,
Expand Down Expand Up @@ -464,6 +468,10 @@ func (c *client) DeleteAllOf(
key.Namespace = string(n)
break
}
if clOpt, ok := opt.(*libClient.DeleteAllOfOptions); ok {
key.Namespace = clOpt.Namespace
break
}
}
client, err := c.getAuthorizedClientFn(
ctx,
Expand Down

0 comments on commit 9caa63f

Please sign in to comment.