object

package
v0.0.0-...-bfef3a7 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendToListItem

func AppendToListItem(list client.ObjectList, obj client.Object)

AppendToListItem appends an object to a list.

func ApplyStrategicMergePatch

func ApplyStrategicMergePatch(original, patch *unstructured.Unstructured) (*unstructured.Unstructured, error)

ApplyStrategicMergePatch is a partial local re-implementation of strategic merge patches.

func ConvertRuntimeObjectToClientObject

func ConvertRuntimeObjectToClientObject(runtimeObj runtime.Object) (client.Object, error)

ConvertRuntimeObjectToClientObject converts a core runtime objects into a full client.Object.

func DeepCopyAny

func DeepCopyAny(value any) any

DeepCopyAny clones an arbitrary value.

func DeepCopyInto

func DeepCopyInto(in, out Object)

DeepCopyInto copies an Object into another one.

func DeepEqual

func DeepEqual(a, b Object) bool

DeepEqual compares to Objects.

func Dump

func Dump(obj Object) string

Dump converts an unstuctured object into a human-readable form.

func GetBaseScheme

func GetBaseScheme() *runtime.Scheme

GetBaseScheme returns a base scheme. Used mostly for testing.

func MergeAny

func MergeAny(a, b any) (any, error)

MergeAny merges two arbitrary values.

func Patch

func Patch(obj Object, m map[string]any) error

Patch performs an in-place patch.

func SetContent

func SetContent(obj Object, content map[string]any)

SetContent is similar to SetUnstructuredContent but it preserves the GVK, the name and the namespace and deep-copies the content.

func SetName

func SetName(obj Object, ns, name string)

SetName is a shortcut to SetNamespace(ns) followed by SetNamespace(name).

Types

type Object

type Object = *unstructured.Unstructured

Object is an alias for a Kubernetes unstructured object used internally as an object representation.

func DeepCopy

func DeepCopy(in Object) Object

DeepCopy copies an Object.

func New

func New() Object

New create a new object.

func NewViewObject

func NewViewObject(view string) Object

NewViewObject initializes an empty object in the given view and sets the GVK.

func NewViewObjectFromNativeObject

func NewViewObjectFromNativeObject(view string, clientObj client.Object) (Object, error)

NewViewObjectFromNativeObject creates a view object from a client.Object.

type ObjectList

type ObjectList = *unstructured.UnstructuredList //nolint:revive

ObjectList is an alias for a Kubernetes unstructured lists.

func NewViewObjectList

func NewViewObjectList(view string) ObjectList

NewViewObjectList creates an empty object list.

Jump to

Keyboard shortcuts

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