This section is empty.


This section is empty.


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.


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)