helpers

package
v1.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListObjectNames

func ListObjectNames(mapper apimeta.RESTMapper, client dynamic.Interface, namespace string, selector labels.Selector, info provider.CustomMetricInfo) ([]string, error)

ListObjectNames uses the given dynamic client to list the names of all objects of the given resource matching the given selector. Namespace may be empty if the metric is for a root-scoped resource.

func ReferenceFor

ReferenceFor returns a new ObjectReference for the given group-resource and name. The group-resource is converted into a group-version-kind using the given RESTMapper. You can use this to easily construct an object reference for use in the DescribedObject field of CustomMetricInfo.

func ResourceFor

ResourceFor attempts to resolve a single qualified resource for the given metric. You can use this to resolve a particular piece of CustomMetricInfo to the underlying resource that it describes, so that you can list matching objects in the cluster.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL