Documentation
¶
Index ¶
- func GetGVR(resource string, unstructured *unstructuredv1.Unstructured) schema.GroupVersionResource
- func PatchWithRuntimeObject(original, modified runtime.Object, datastruct interface{}) (bytes []byte, err error)
- func PatchWithUnstructured(original, modified *unstructured.Unstructured, datastruct interface{}) (bytes []byte, err error)
- func ToUnstructured(object runtime.Object) (unstructured *unstructuredv1.Unstructured, err error)
- type Ensurer
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 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
Click to show internal directories.
Click to hide internal directories.