controller-runtime: Index | Files

package apiutil

import ""

Package apiutil contains utilities for working with raw Kubernetes API machinery, such as creating RESTMappers and raw REST clients, and extracting the GVK of an object.


Package Files


func GVKForObject Uses

func GVKForObject(obj runtime.Object, scheme *runtime.Scheme) (schema.GroupVersionKind, error)

GVKForObject finds the GroupVersionKind associated with the given object, if there is only a single such GVK.

func NewDiscoveryRESTMapper Uses

func NewDiscoveryRESTMapper(c *rest.Config) (meta.RESTMapper, error)

NewDiscoveryRESTMapper constructs a new RESTMapper based on discovery information fetched by a new client with the given config.

func RESTClientForGVK Uses

func RESTClientForGVK(gvk schema.GroupVersionKind, baseConfig *rest.Config, codecs serializer.CodecFactory) (rest.Interface, error)

RESTClientForGVK constructs a new rest.Interface capable of accessing the resource associated with the given GroupVersionKind. The REST client will be configured to use the negotiated serializer from baseConfig, if set, otherwise a default serializer will be set.

Package apiutil imports 8 packages (graph) and is imported by 64 packages. Updated 2019-04-09. Refresh now. Tools for package owners.