Skip to content

Commit

Permalink
Allow optional VK in CR metrics
Browse files Browse the repository at this point in the history
Allow optional VK in CR metrics, while only requiring the group to be
fixed. This would allow users to define custom metrics for:
* a specific API version: version is fixed, kind varies.
* all the API versions of a resource: version varies, kind is fixed.
* all the APIs part of an API group: version varies, kind varies.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
  • Loading branch information
rexagod committed Oct 7, 2022
1 parent 12402a5 commit 91acc37
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/customresourcestate/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ type ConfigDecoder interface {
Decode(v interface{}) (err error)
}

// generateResources generates the set of possible resources from the varying V and, or K of the original config.
func generateResources(r []Resource) []Resource {
return nil
}

// FromConfig decodes a configuration source into a slice of customresource.RegistryFactory that are ready to use.
func FromConfig(decoder ConfigDecoder) ([]customresource.RegistryFactory, error) {
var crconfig Metrics
Expand Down

0 comments on commit 91acc37

Please sign in to comment.