Skip to content

Commit

Permalink
fix: support namespaces requests for client-go metrics (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdeal committed Jul 1, 2024
1 parent 2457d6a commit bdd9eb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ func parsePath(path string) *pathData {
if len(parts) < groupIdx+3 {
return nil
}
// This resource is namespaced
if parts[groupIdx+2] == "namespaces" {
// This resource is namespaced and the resource is not the namespace
if parts[groupIdx+2] == "namespaces" && len(parts) > groupIdx+4 {
versionIdx = groupIdx + 1
kindIdx = versionIdx + 3
} else {
Expand Down

0 comments on commit bdd9eb9

Please sign in to comment.