Documentation ¶
Index ¶
- func FromUnstructured(obj *unstructured.Unstructured) (metav1.Object, error)
- func IsCRD(obj *unstructured.Unstructured) bool
- func IsNamespacedKind(gvk schema.GroupVersionKind, clientSet *DynamicClientSet) (bool, error)
- func IsNoNamespaceInfoErr(err error) bool
- func JobFromUnstructured(uns *unstructured.Unstructured) (*batchv1.Job, error)
- func NamespaceOrDefault(ns string) string
- func NewMemCacheClient(delegate discovery.DiscoveryInterface) discovery.CachedDiscoveryInterface
- func PodFromUnstructured(uns *unstructured.Unstructured) (*corev1.Pod, error)
- func ResourceClient(kind kinds.Kind, namespace string, client *DynamicClientSet) (dynamic.ResourceInterface, error)
- type DynamicClientSet
- type LogClient
- type NoNamespaceInfoErr
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 IsNamespacedKind ¶ added in v1.4.4
func IsNamespacedKind(gvk schema.GroupVersionKind, clientSet *DynamicClientSet) (bool, error)
IsNamespacedKind checks if a given GVK is namespace-scoped. Known GVKs are compared against a static lookup table. For GVKs not in the table, attempt to look up the GVK from the API server. If the GVK cannot be found, a NoNamespaceInfoErr is returned.
func IsNoNamespaceInfoErr ¶ added in v0.23.0
func JobFromUnstructured ¶ added in v1.2.0
func JobFromUnstructured(uns *unstructured.Unstructured) (*batchv1.Job, error)
func NamespaceOrDefault ¶ added in v1.1.0
NamespaceOrDefault returns `ns` or the the default namespace `"default"` if `ns` is empty.
func NewMemCacheClient ¶ added in v0.20.2
func NewMemCacheClient(delegate discovery.DiscoveryInterface) discovery.CachedDiscoveryInterface
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 PodFromUnstructured ¶ added in v0.25.2
func PodFromUnstructured(uns *unstructured.Unstructured) (*corev1.Pod, error)
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)
type LogClient ¶ added in v1.3.0
type LogClient struct {
// contains filtered or unexported fields
}
func NewLogClient ¶ added in v1.3.0
type NoNamespaceInfoErr ¶ added in v0.23.0
type NoNamespaceInfoErr struct {
// contains filtered or unexported fields
}
func (*NoNamespaceInfoErr) Error ¶ added in v0.23.0
func (e *NoNamespaceInfoErr) Error() string
Click to show internal directories.
Click to hide internal directories.