Documentation
¶
Index ¶
- func ApplyJSONMergePatch(original, patch []byte) ([]byte, error)
- func ApplyStrategicMergePatch(gvk schema.GroupVersionKind, original, patch []byte) ([]byte, error)
- func ContainsString(slice []string, s string) bool
- func CreateJSONMergePatch(original, current, modified []byte) ([]byte, error)
- func CreateStrategicMergePatch(gvk schema.GroupVersionKind, original, current, modified []byte) ([]byte, error)
- func GetGVK(b []byte) (*schema.GroupVersionKind, error)
- func IsStrategicMergePatch(gvk schema.GroupVersionKind) bool
- func KnownObject(gvk schema.GroupVersionKind) bool
- func NewObject(gvk schema.GroupVersionKind) (o client.Object, err error)
- func OwnsObject(owner, object metav1.Object) bool
- func RemoveString(slice []string, s string) (result []string)
- func SetNamespace(so *clusterv2.StepObject, namespace string) error
- func SetOwnerReference(owner, object metav1.Object) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyJSONMergePatch ¶
ApplyJSONMergePatch applies JSON merge patch onto the original document
func ApplyStrategicMergePatch ¶
func ApplyStrategicMergePatch(gvk schema.GroupVersionKind, original, patch []byte) ([]byte, error)
ApplyStrategicMergePatch applies strategic merge patch on orginal
func ContainsString ¶
ContainsString checks if string exists in slice
func CreateJSONMergePatch ¶
CreateJSONMergePatch creates JSON merge patch between original, current and modified
func CreateStrategicMergePatch ¶
func CreateStrategicMergePatch(gvk schema.GroupVersionKind, original, current, modified []byte) ([]byte, error)
CreateStrategicMergePatch creates strategic merge patch for original and modified
func GetGVK ¶
func GetGVK(b []byte) (*schema.GroupVersionKind, error)
GetGVK returns GroupVersionKind of json serialized k8s object
func IsStrategicMergePatch ¶
func IsStrategicMergePatch(gvk schema.GroupVersionKind) bool
IsStrategicMergePatch returns true if gvk is present in the registerd scheme
func KnownObject ¶
func KnownObject(gvk schema.GroupVersionKind) bool
KnownObject returns true if the object GVK is in scheme
func NewObject ¶
func NewObject(gvk schema.GroupVersionKind) (o client.Object, err error)
NewObject returns new object of given GVK
func OwnsObject ¶
OwnsObject checks if the object is owned by the owner
func RemoveString ¶
RemoveString removes string from slick
func SetNamespace ¶
func SetNamespace(so *clusterv2.StepObject, namespace string) error
SetNamespace is a utility function setting namespace for a step objects it preserves namespace if already set for selective resources
func SetOwnerReference ¶
SetOwnerReference sets owner reference for objects controlled by paralus cluster controllers
Types ¶
This section is empty.