Documentation ¶
Index ¶
- Constants
- func AppendItem(v reflect.Value, obj runtime.Object)
- func DeleteFinalizer(u *unstructured.Unstructured, finalizerStr string)
- func Empty(obj runtime.Unstructured) runtime.Unstructured
- func EmptyCondition(conditionType string) map[string]any
- func EnsureDir(dirname string) error
- func Equal(cond1, cond2 map[string]any) bool
- func Exists(filepath string) bool
- func GetCondition(obj map[string]interface{}, conditionType string) map[string]any
- func GetConditions(status map[string]any) []any
- func GetFileName(filename string) ([]byte, error)
- func GetGeneration(ru runtime.Unstructured) int64
- func GetListPrt(listObj runtime.Object) (reflect.Value, error)
- func GetObjectRefFromOwnerRef(ownref metav1.OwnerReference) corev1.ObjectReference
- func GetObjectRefFromUnstructured(u *unstructured.Unstructured) corev1.ObjectReference
- func GetStatus(obj map[string]any) map[string]any
- func GetUnstructructered(obj runtime.Object) (runtime.Unstructured, error)
- func GetUnstructured(b []byte) (*unstructured.Unstructured, error)
- func GetUnstructuredContent(b []byte, ct ContentType) (*unstructured.Unstructured, error)
- func GetUnstructuredFromFile(filename string) (*unstructured.Unstructured, error)
- func GetUnstructuredList(b []byte) (*unstructured.UnstructuredList, error)
- func GetUnstructuredListContent(b []byte, ct ContentType) (*unstructured.UnstructuredList, error)
- func IsConditionTypeReady(obj map[string]interface{}, conditionType string) bool
- func IsManagedBy(mfields []metav1.ManagedFieldsEntry, fieldManager string) bool
- func Marshal(u *unstructured.Unstructured) ([]byte, error)
- func NewCondition(conditionType, msg string) map[string]any
- func NewPathElement(s string) (fieldpath.PathElement, error)
- func PruneUnmanagedFields(obj runtime.Unstructured, reconcilerName string)
- func RemoveManagedFieldsFromUnstructured(ctx context.Context, obj runtime.Unstructured)
- func RemoveResourceVersionAndGenerationFromUnstructured(ctx context.Context, obj runtime.Unstructured)
- func SetCondition(obj map[string]interface{}, conditionType, msg string)
- func SetFinalizer(u *unstructured.Unstructured, finalizerStr string)
- type ContentType
Constants ¶
View Source
const ( // Field indicates that the content of this path element is a field's name Field = "f" // Value indicates that the content of this path element is a field's value Value = "v" // Index indicates that the content of this path element is an index in an array Index = "i" // Key indicates that the content of this path element is a key value map Key = "k" // Separator separates the type of a path element from the contents Separator = ":" )
Variables ¶
This section is empty.
Functions ¶
func DeleteFinalizer ¶ added in v0.0.7
func DeleteFinalizer(u *unstructured.Unstructured, finalizerStr string)
func Empty ¶
func Empty(obj runtime.Unstructured) runtime.Unstructured
func EmptyCondition ¶
func Equal ¶
Equal returns true if the condition is identical to the supplied condition, ignoring the LastTransitionTime.
func GetCondition ¶
func GetConditions ¶
func GetFileName ¶
func GetGeneration ¶
func GetGeneration(ru runtime.Unstructured) int64
func GetObjectRefFromOwnerRef ¶
func GetObjectRefFromOwnerRef(ownref metav1.OwnerReference) corev1.ObjectReference
func GetObjectRefFromUnstructured ¶
func GetObjectRefFromUnstructured(u *unstructured.Unstructured) corev1.ObjectReference
func GetUnstructructered ¶
func GetUnstructructered(obj runtime.Object) (runtime.Unstructured, error)
func GetUnstructured ¶
func GetUnstructured(b []byte) (*unstructured.Unstructured, error)
func GetUnstructuredContent ¶
func GetUnstructuredContent(b []byte, ct ContentType) (*unstructured.Unstructured, error)
func GetUnstructuredFromFile ¶
func GetUnstructuredFromFile(filename string) (*unstructured.Unstructured, error)
func GetUnstructuredList ¶
func GetUnstructuredList(b []byte) (*unstructured.UnstructuredList, error)
func GetUnstructuredListContent ¶
func GetUnstructuredListContent(b []byte, ct ContentType) (*unstructured.UnstructuredList, error)
func IsConditionTypeReady ¶
func IsManagedBy ¶
func IsManagedBy(mfields []metav1.ManagedFieldsEntry, fieldManager string) bool
func Marshal ¶
func Marshal(u *unstructured.Unstructured) ([]byte, error)
func NewCondition ¶
func NewPathElement ¶ added in v0.0.7
func NewPathElement(s string) (fieldpath.PathElement, error)
NewPathElement parses a serialized path element
func PruneUnmanagedFields ¶ added in v0.0.7
func PruneUnmanagedFields(obj runtime.Unstructured, reconcilerName string)
func RemoveManagedFieldsFromUnstructured ¶ added in v0.0.11
func RemoveManagedFieldsFromUnstructured(ctx context.Context, obj runtime.Unstructured)
func RemoveResourceVersionAndGenerationFromUnstructured ¶ added in v0.0.11
func RemoveResourceVersionAndGenerationFromUnstructured(ctx context.Context, obj runtime.Unstructured)
func SetCondition ¶
SetCondition updates the condition; when msg is an empty string the condition is interpreted as ready, otherwise failed
func SetFinalizer ¶ added in v0.0.7
func SetFinalizer(u *unstructured.Unstructured, finalizerStr string)
Types ¶
type ContentType ¶
type ContentType string
const ( ContentTypeYAML ContentType = "yaml" ContentTypeJSON ContentType = "json" )
Click to show internal directories.
Click to hide internal directories.