Documentation ¶
Index ¶
- func AddAnnotations(o metav1.Object, annotations map[string]string)
- func AddFinalizer(o metav1.Object, finalizer string)
- func AddLabels(o metav1.Object, labels map[string]string)
- func FinalizerExists(o metav1.Object, finalizer string) bool
- func GVKToString(gvk *schema.GroupVersionKind) string
- func GetGVKFromAPIVersionKind(apiVersion, kind string) *schema.GroupVersionKind
- func GetGVKFromObject(o client.Object) *schema.GroupVersionKind
- func GetGVKFromRuntimeRawExtension(gvr runtime.RawExtension) (*schema.GroupVersionKind, error)
- func GetGVKfromGVR(c *rest.Config, gvr schema.GroupVersionResource) (schema.GroupVersionKind, error)
- func GetUnstructuredFromGVK(gvk *schema.GroupVersionKind) *unstructured.Unstructured
- func GetUnstructuredListFromGVK(gvk *schema.GroupVersionKind) *unstructured.UnstructuredList
- func Ignore(is ErrorIs, err error) error
- func IgnoreAlreadyExists(err error) error
- func IgnoreNotFound(err error) error
- func MarshalData(o *unstructured.Unstructured) (any, error)
- func RemoveAnnotations(o metav1.Object, annotations ...string)
- func RemoveFinalizer(o metav1.Object, finalizer string)
- func RemoveLabels(o metav1.Object, labels ...string)
- func StringToGVK(s string) *schema.GroupVersionKind
- func StringToGroupVersionKind(s string) (string, string, string)
- func WasDeleted(o metav1.Object) bool
- type APIFinalizer
- type ErrorIs
- type Finalizer
- type Object
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFinalizer ¶
AddFinalizer to the supplied k8s object's metadata.
func FinalizerExists ¶
FinalizerExists checks whether a certain finalizer is already set on the aupplied object
func GVKToString ¶
func GVKToString(gvk *schema.GroupVersionKind) string
func GetGVKFromAPIVersionKind ¶
func GetGVKFromAPIVersionKind(apiVersion, kind string) *schema.GroupVersionKind
func GetGVKFromObject ¶
func GetGVKFromObject(o client.Object) *schema.GroupVersionKind
func GetGVKFromRuntimeRawExtension ¶
func GetGVKFromRuntimeRawExtension(gvr runtime.RawExtension) (*schema.GroupVersionKind, error)
func GetGVKfromGVR ¶
func GetGVKfromGVR(c *rest.Config, gvr schema.GroupVersionResource) (schema.GroupVersionKind, error)
func GetUnstructuredFromGVK ¶
func GetUnstructuredFromGVK(gvk *schema.GroupVersionKind) *unstructured.Unstructured
func GetUnstructuredListFromGVK ¶
func GetUnstructuredListFromGVK(gvk *schema.GroupVersionKind) *unstructured.UnstructuredList
func IgnoreAlreadyExists ¶
IgnoreAlreadyExists returns the supplied error, or nil if the error indicates a Kubernetes resource already exists.
func IgnoreNotFound ¶
IgnoreNotFound returns the supplied error, or nil if the error indicates a Kubernetes resource was not found.
func MarshalData ¶
func MarshalData(o *unstructured.Unstructured) (any, error)
func RemoveAnnotations ¶
func RemoveFinalizer ¶
RemoveFinalizer from the supplied k8s object's metadata.
func RemoveLabels ¶
func StringToGVK ¶
func StringToGVK(s string) *schema.GroupVersionKind
func WasDeleted ¶
Types ¶
type APIFinalizer ¶
type APIFinalizer struct {
// contains filtered or unexported fields
}
An APIFinalizer manages the lifecycle of a finalizer on a k8s object.
func NewAPIFinalizer ¶
func NewAPIFinalizer(c client.Client, finalizer string) *APIFinalizer
NewAPIFinalizer returns a new APIFinalizer.
func (*APIFinalizer) AddFinalizer ¶
func (a *APIFinalizer) AddFinalizer(ctx context.Context, obj Object) error
AddFinalizer to the supplied Managed resource.
func (*APIFinalizer) RemoveFinalizer ¶
func (a *APIFinalizer) RemoveFinalizer(ctx context.Context, obj Object) error
Click to show internal directories.
Click to hide internal directories.