Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(backport release-1.2): fix(api): fix list ops in authorizing client #3397

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
key.Namespace = string(n)
break
}
if clOpt, ok := opt.(*libClient.ListOptions); ok {
key.Namespace = clOpt.Namespace
break

Check warning on line 343 in internal/api/kubernetes/client.go

View check run for this annotation

Codecov / codecov/patch

internal/api/kubernetes/client.go#L341-L343

Added lines #L341 - L343 were not covered by tests
}
}
client, err := c.getAuthorizedClientFn(
ctx,
Expand Down Expand Up @@ -464,6 +468,10 @@
key.Namespace = string(n)
break
}
if clOpt, ok := opt.(*libClient.DeleteAllOfOptions); ok {
key.Namespace = clOpt.Namespace
break

Check warning on line 473 in internal/api/kubernetes/client.go

View check run for this annotation

Codecov / codecov/patch

internal/api/kubernetes/client.go#L471-L473

Added lines #L471 - L473 were not covered by tests
}
}
client, err := c.getAuthorizedClientFn(
ctx,
Expand Down