unstructured

package
v0.0.0-...-2bcb20d Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustToUnstructured

func MustToUnstructured(obj runtime.Object) *unstructured.Unstructured

MustToUnstructured is a helper function that converts a runtime.Object to an unstructured.Unstructured to be used by the dynamic client. The dynamic client only uses *unstructured.Unstructured when accessing specific resources. e.g. for namespaces

 namespace := &coreV1.Namespace{
	    ObjectMeta: metav1.ObjectMeta{
			Name:        "namespaceName",
			Annotations: annotations,
			Labels:      labels,
		},
 }
 namespaceUnstructured := unstructured.MustToUnstructured(namespace)

Types

This section is empty.

Jump to

Keyboard shortcuts

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