Documentation ¶
Index ¶
- func CreateOrPatchObject(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, ...) error
- func CreateOrPatchObjectByRef(ctx context.Context, c client.Client, ...) error
- func DeleteObject(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, ...) error
- func DeleteObjectByRef(ctx context.Context, c client.Client, ...) error
- func FilterMetadata(content map[string]any, fields ...string) map[string]any
- func GetObject(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, ...) (map[string]any, error)
- func GetObjectByRef(ctx context.Context, c client.Client, ...) (map[string]any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrPatchObject ¶
func CreateOrPatchObject(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, name, namespace string, content map[string]any) error
CreateOrPatchObject creates or patches the object with the given GVK, name, and namespace using the given client. The object is created or patched with the given content, except for system metadata fields, namespace, and name. This function can be combined with runtime.DefaultUnstructuredConverter.ToUnstructured to create or update an object from runtime.RawExtension.
func CreateOrPatchObjectByRef ¶
func CreateOrPatchObjectByRef(ctx context.Context, c client.Client, ref *autoscalingv1.CrossVersionObjectReference, namespace string, content map[string]any) error
CreateOrPatchObjectByRef creates or patches the object with the given reference and namespace using the given client. The object is created or patched with the given content, except for system metadata fields. This function can be combined with runtime.DefaultUnstructuredConverter.ToUnstructured to create or update an object from runtime.RawExtension.
func DeleteObject ¶
func DeleteObject(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, name, namespace string) error
DeleteObject deletes the object with the given GVK, name, and namespace using the given client.
func DeleteObjectByRef ¶
func DeleteObjectByRef(ctx context.Context, c client.Client, ref *autoscalingv1.CrossVersionObjectReference, namespace string) error
DeleteObjectByRef deletes the object with the given reference and namespace using the given client.
func FilterMetadata ¶ added in v1.40.3
FilterMetadata filters metadata from the provided unstructured object content.
func GetObject ¶
func GetObject(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, name, namespace string) (map[string]any, error)
GetObject returns the object with the given GVK, name, and namespace as a map using the given client. The full content of the object is returned as map[string]any, except for system metadata fields. This function can be combined with runtime.DefaultUnstructuredConverter.FromUnstructured to get the object content as runtime.RawExtension.
func GetObjectByRef ¶
func GetObjectByRef(ctx context.Context, c client.Client, ref *autoscalingv1.CrossVersionObjectReference, namespace string) (map[string]any, error)
GetObjectByRef returns the object with the given reference and namespace using the given client. The full content of the object is returned as map[string]any, except for system metadata fields. This function can be combined with runtime.DefaultUnstructuredConverter.FromUnstructured to get the object content as runtime.RawExtension.
Types ¶
This section is empty.