normalize

package
v0.45.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2025 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DryRunUnstructured

func DryRunUnstructured(object *unstructured.Unstructured) error

DryRunUnstructured normalizes an Unstructured object retrieved from a dry-run by performing fixes for known upstream issues.

func FromUnstructured

func FromUnstructured(object *unstructured.Unstructured) (metav1.Object, error)

FromUnstructured converts an Unstructured object into a typed Kubernetes resource. It only works for API types registered with the default client-go scheme.

func FromUnstructuredWithScheme

func FromUnstructuredWithScheme(object *unstructured.Unstructured, scheme *runtime.Scheme) (metav1.Object, error)

FromUnstructuredWithScheme converts an Unstructured object into a typed Kubernetes resource. It only works for API types registered with the given scheme.

func ToUnstructured

func ToUnstructured(obj metav1.Object) (*unstructured.Unstructured, error)

ToUnstructured converts a typed Kubernetes resource into the Unstructured equivalent.

func Unstructured

func Unstructured(object *unstructured.Unstructured) error

Unstructured normalizes an Unstructured object by converting it to a typed Kubernetes resource, normalizing it, and then converting it back to an Unstructured object. It only works for API types registered with the default client-go scheme. If the conversion fails, only certain standard fields are removed.

func UnstructuredList

func UnstructuredList(objects []*unstructured.Unstructured) error

UnstructuredList normalizes a list of Unstructured objects by converting them to typed Kubernetes resources, normalizing them, and then converting them back to Unstructured objects. It only works for API types registered with the default client-go scheme. If the conversion fails, only certain standard fields are removed.

func UnstructuredListWithScheme

func UnstructuredListWithScheme(objects []*unstructured.Unstructured, scheme *runtime.Scheme) error

UnstructuredListWithScheme normalizes a list of Unstructured objects by converting them to typed Kubernetes resources, normalizing them, and then converting them back to Unstructured objects. It only works for API types registered with the given scheme. If the conversion fails, only certain standard fields are removed.

func UnstructuredWithScheme

func UnstructuredWithScheme(object *unstructured.Unstructured, scheme *runtime.Scheme) error

UnstructuredWithScheme normalizes an Unstructured object by converting it to a typed Kubernetes resource, normalizing it, and then converting it back to an Unstructured object. It only works for API types registered with the given scheme. If the conversion fails, only certain standard fields are removed.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL