Documentation ¶
Index ¶
- func AddFinalizer(ctx context.Context, k8sClient client.Client, ...) error
- func GetReadyConditionReason(nm *maintenancev1.NodeMaintenance) string
- func HasOwnerRef(owner metav1.Object, object metav1.Object) bool
- func IsNodeReady(n *corev1.Node) bool
- func IsNodeUnschedulable(n *corev1.Node) bool
- func IsUnderMaintenance(nm *maintenancev1.NodeMaintenance) bool
- func RemoveFinalizer(ctx context.Context, k8sClient client.Client, ...) error
- func SetOwnerRef(ctx context.Context, k8sClient client.Client, owner metav1.Object, ...) error
- func SetReadyConditionReason(ctx context.Context, client client.Client, nm *maintenancev1.NodeMaintenance, ...) error
- func SetReadyConditionReasonMsg(ctx context.Context, client client.Client, nm *maintenancev1.NodeMaintenance, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFinalizer ¶
func AddFinalizer(ctx context.Context, k8sClient client.Client, nm *maintenancev1.NodeMaintenance, finalizer string) error
AddFinalizer conditionally adds finalizer from NodeMaintenance
func GetReadyConditionReason ¶
func GetReadyConditionReason(nm *maintenancev1.NodeMaintenance) string
GetReadyConditionReason returns NodeMaintenance Ready condition.Reason or empty string if unset
func HasOwnerRef ¶
HasOwnerRef returns true if object owned by owner
func IsNodeUnschedulable ¶
IsNodeUnschedulable returns true if node is Unschedulabel
func IsUnderMaintenance ¶
func IsUnderMaintenance(nm *maintenancev1.NodeMaintenance) bool
IsUnderMaintenance returns true if NodeMaintenance is currently undergoing maintenance
func RemoveFinalizer ¶
func RemoveFinalizer(ctx context.Context, k8sClient client.Client, nm *maintenancev1.NodeMaintenance, finalizer string) error
RemoveFinalizer conditionally removes finalizer from NodeMaintenance
func SetOwnerRef ¶
func SetOwnerRef(ctx context.Context, k8sClient client.Client, owner metav1.Object, object client.Object) error
SetOwnerRef conditionally sets owner referece of object to owner
func SetReadyConditionReason ¶
func SetReadyConditionReason(ctx context.Context, client client.Client, nm *maintenancev1.NodeMaintenance, reason string) error
SetReadyConditionReason sets or updates Ready condition in nm.Status with reason. in addition, it updates status of the object in k8s api if required. returns error if occurred.
func SetReadyConditionReasonMsg ¶
func SetReadyConditionReasonMsg(ctx context.Context, client client.Client, nm *maintenancev1.NodeMaintenance, reason string, msg string) error
SetReadyConditionReasonMsg sets or updates Ready condition in nm.Status with reason and msg. in addition, it updates status of the object in k8s api if required. returns error if occurred.
Types ¶
This section is empty.