Skip to content

Commit

Permalink
Skip deprecated resources
Browse files Browse the repository at this point in the history
To avoid the warning:

    W0503 01:07:59.564568 2724335 warnings.go:70] v1 ComponentStatus is deprecated in v1.19+

Maybe it is possible to silence the warning, but this resource is not
needed now so lets skip it.

[1] kubernetes/kubernetes#93570
  • Loading branch information
nirs committed May 2, 2024
1 parent 600a386 commit ab5b38a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/gather/gather.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ func (g *Gatherer) listAPIResources() ([]resourceInfo, error) {
}
}

// Avoid warning: "v1 ComponentStatus is deprecated in v1.19+"
if res.Name == "componentstatuses" && gv.Group == "" {
continue
}

resources = append(resources, resourceInfo{GroupVersion: &gv, APIResource: res})
}
}
Expand Down

0 comments on commit ab5b38a

Please sign in to comment.