Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConditionsFromUnstructured ¶
func ConditionsFromUnstructured(unstrObj *unstructured.Unstructured) ([]metav1.Condition, error)
ConditionsFromUnstructured fetches all of the status.conditions from an unstructured object and returns them as a slice of metav1.Condition. The status.conditions field is expected to be a slice of map[string]any which can be cast into a metav1.Condition.
func ObjKindName ¶
func ObjKindName(unstrObj *unstructured.Unstructured) (name, kind string)
Types ¶
type ResourceConditions ¶
func GetResourceConditions ¶
func GetResourceConditions( ctx context.Context, namespace string, dynamicClient dynamic.Interface, gvr schema.GroupVersionResource, labelSelector string, ) (resourceConditions *ResourceConditions, err error)
GetResourceConditions fetches the conditions from a resource identified by the provided GroupVersionResource and labelSelector. The function returns a ResourceConditions struct containing the name/kind of the resource and the conditions. If the resource is not found, returns a ResourceNotFoundError which can be checked by the caller to prevent reconciliation loops.
type ResourceNotFoundError ¶
type ResourceNotFoundError struct {
Resource string
}
func (ResourceNotFoundError) Error ¶
func (e ResourceNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.