dynamicclient

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: Apache-2.0 Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDynamicClientForAPIResource

func GetDynamicClientForAPIResource(context context.Context, resource *metav1.APIResource) (dynamic.NamespaceableResourceInterface, error)

GetDynamicClientOnAPIResource returns a dynamic client on an APIResource. This client can be further namespaced. needs context with log and restConfig

func GetDynamicClientForGVK

func GetDynamicClientForGVK(context context.Context, gvk schema.GroupVersionKind) (dynamic.NamespaceableResourceInterface, bool, error)

GetDynamicClientForGVK returns a dynamic client on an gvk type. Also returns whether this reosurce is namespaced. This client can be further namespaced. needs context with log and restConfig

func GetDynamicClientOnUnstructured

func GetDynamicClientOnUnstructured(context context.Context, obj *unstructured.Unstructured) (dynamic.ResourceInterface, error)

GetDynamicClientOnUnstructured returns a dynamic client on an Unstructured type. This client can be further namespaced. needs context with log and restConfig TODO consider refactoring using apimachinery.RESTClientForGVK in controller-runtime

func SetIndexField

func SetIndexField(context context.Context, cache cache.Cache, obj client.Object, path string) error

SetIndexField this function allows to prepare an index field for an objct so that fieldSelector can be used. It needs a cache object probably obtained via mrg.GetCache() This is a generic implementation, so it's relatively slow path should be expressed in the form of .<field>.<field> ... needs context with log

Types

This section is empty.

Jump to

Keyboard shortcuts

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