clients

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: Apache-2.0 Imports: 23 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromUnstructured added in v0.20.4

func FromUnstructured(obj *unstructured.Unstructured) (metav1.Object, error)

func IsCRD

func IsCRD(obj *unstructured.Unstructured) bool

IsCRD returns true if a Kubernetes resource is a CRD.

func NewMemCacheClient added in v0.20.2

NewMemCacheClient creates a new CachedDiscoveryInterface which caches discovery information in memory and will stay up-to-date if Invalidate is called with regularity.

NOTE: The client will NOT resort to live lookups on cache misses.

func ResourceClient

func ResourceClient(kind kinds.Kind, namespace string, client *DynamicClientSet) (dynamic.ResourceInterface, error)

Types

type DynamicClientSet

type DynamicClientSet struct {
	GenericClient         dynamic.Interface
	DiscoveryClientCached discovery.CachedDiscoveryInterface
	RESTMapper            *restmapper.DeferredDiscoveryRESTMapper
}

func NewDynamicClientSet

func NewDynamicClientSet(clientConfig *rest.Config) (*DynamicClientSet, error)

func (*DynamicClientSet) ResourceClient

func (dcs *DynamicClientSet) ResourceClient(gvk schema.GroupVersionKind, namespace string,
) (dynamic.ResourceInterface, error)

func (*DynamicClientSet) ResourceClientForObject

func (dcs *DynamicClientSet) ResourceClientForObject(obj *unstructured.Unstructured,
) (dynamic.ResourceInterface, error)

Jump to

Keyboard shortcuts

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