Documentation ¶
Index ¶
- func GetDynamicClientForAPIResource(context context.Context, resource *metav1.APIResource) (dynamic.NamespaceableResourceInterface, error)
- func GetDynamicClientForGVK(context context.Context, gvk schema.GroupVersionKind) (dynamic.NamespaceableResourceInterface, bool, error)
- func GetDynamicClientOnUnstructured(context context.Context, obj *unstructured.Unstructured) (dynamic.ResourceInterface, error)
- func SetIndexField(context context.Context, cache cache.Cache, obj client.Object, path string) error
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.