Documentation ¶
Index ¶
- func GetClient[T, TL runtime.Object](c ClientGetter, namespace string) ktypes.ReadWriteAPI[T, TL]
- func GetInformerFiltered[T runtime.Object](c ClientGetter, opts ktypes.InformerOptions, gvr schema.GroupVersionResource) informerfactory.StartableInformer
- func GetInformerFilteredFromGVR(c ClientGetter, opts ktypes.InformerOptions, g schema.GroupVersionResource) informerfactory.StartableInformer
- func GetWriteClient[T runtime.Object](c ClientGetter, namespace string) ktypes.WriteAPI[T]
- func Register[T runtime.Object](gvr schema.GroupVersionResource, gvk schema.GroupVersionKind, ...)
- type ClientGetter
- type TypeRegistration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClient ¶
func GetClient[T, TL runtime.Object](c ClientGetter, namespace string) ktypes.ReadWriteAPI[T, TL]
func GetInformerFiltered ¶
func GetInformerFiltered[T runtime.Object]( c ClientGetter, opts ktypes.InformerOptions, gvr schema.GroupVersionResource, ) informerfactory.StartableInformer
GetInformerFiltered attempts to use type information to setup the informer based on registered types. If no registered type is found, this will fallback to the same behavior as GetInformerFilteredFromGVR.
func GetInformerFilteredFromGVR ¶
func GetInformerFilteredFromGVR(c ClientGetter, opts ktypes.InformerOptions, g schema.GroupVersionResource) informerfactory.StartableInformer
GetInformerFilteredFromGVR will build an informer for the given GVR. When using ktypes.StandardInformer as the InformerType, the clients are selected from a statically defined list. Use GetInformerFiltered[T] for dynamically registered types.
func GetWriteClient ¶
func Register ¶
func Register[T runtime.Object]( gvr schema.GroupVersionResource, gvk schema.GroupVersionKind, list func(c ClientGetter, namespace string, o metav1.ListOptions) (runtime.Object, error), watch func(c ClientGetter, namespace string, o metav1.ListOptions) (watch.Interface, error), )
Register provides the TypeRegistration to the underlying store to enable dynamic object translation
Types ¶
type ClientGetter ¶
type ClientGetter interface { // Ext returns the API extensions client. Ext() kubeext.Interface // Kube returns the core kube client Kube() kubernetes.Interface // Dynamic client. Dynamic() dynamic.Interface // Metadata returns the Metadata kube client. Metadata() metadata.Interface // Istio returns the Istio kube client. Istio() istioclient.Interface // GatewayAPI returns the gateway-api kube client. GatewayAPI() gatewayapiclient.Interface // Informers returns an informer factory. Informers() informerfactory.InformerFactory }
type TypeRegistration ¶
type TypeRegistration[T runtime.Object] interface { kubetypes.RegisterType[T] // ListWatchFunc provides the necessary methods for list and // watch for the informer ListWatch(c ClientGetter, opts ktypes.InformerOptions) cache.ListerWatcher }
TypeRegistration represents the necessary methods to provide a custom type to the kubeclient informer mechanism