dynamic

package
v0.0.0-...-4a3d265 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGVR

func GetGVR(resource string, unstructured *unstructuredv1.Unstructured) schema.GroupVersionResource

GetGVR return returns group, version and resource from a given Unstructured object.

func PatchWithRuntimeObject

func PatchWithRuntimeObject(original, modified runtime.Object, datastruct interface{}) (bytes []byte, err error)

func PatchWithUnstructured

func PatchWithUnstructured(original, modified *unstructured.Unstructured, datastruct interface{}) (bytes []byte, err error)

PatchWithUnstructured generates a patch that can be applied to match the desired object.

func ToUnstructured

func ToUnstructured(object runtime.Object) (unstructured *unstructuredv1.Unstructured, err error)

ToUnstructured converts a given runtime.Object to a corresponding Unstructured type.

Types

type Ensurer

type Ensurer interface {
	Ensure(resource string, object runtime.Object) (current *unstructuredv1.Unstructured, err error)
}

Ensurer is an interface that has Ensure Methid.

Ensure is an idempotent function that ensures that the object specified is stored. If the object does not exist it should be created If the object already exists then it should be updated to match the specified object.

func NewEnsurer

func NewEnsurer(dynamic clientgodynamic.Interface) Ensurer

func NewForConfig

func NewForConfig(config *rest.Config) (ensurer Ensurer, err error)

Jump to

Keyboard shortcuts

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