utils

package
v0.7.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReasonUpdateObjectFailed = "UpdateObjectFailed"
	ReasonGetObjectFailed    = "GetObjectFailed"
)

Variables

View Source
var StatusUpToDateExpectation = expectations.NewResourceVersionExpectation()

Functions

func BeginOperateLifecycle

func BeginOperateLifecycle(client client.Client, adapter podopslifecycle.LifecycleAdapter, pod *corev1.Pod) (bool, error)

func CancelOpsLifecycle

func CancelOpsLifecycle(client client.Client, adapter podopslifecycle.LifecycleAdapter, pod *corev1.Pod) error

func ConvertErrMapToList added in v0.6.1

func ConvertErrMapToList(errMap map[string]error) []error

func ConvertSyncErrMap added in v0.6.1

func ConvertSyncErrMap(errMap *sync.Map) map[string]error

func EnqueueOperationJobFromPod

func EnqueueOperationJobFromPod(c client.Client, pod *corev1.Pod, q *workqueue.RateLimitingInterface, fn func(client.Client, *corev1.Pod) (sets.String, bool))

func FinishOperateLifecycle

func FinishOperateLifecycle(client client.Client, adapter podopslifecycle.LifecycleAdapter, pod *corev1.Pod) error

func IsJobFinished

func IsJobFinished(instance *appsv1alpha1.OperationJob) bool

func MapOpsStatusByPod

func MapOpsStatusByPod(instance *appsv1alpha1.OperationJob) map[string]*appsv1alpha1.OpsStatus

func SetOpsStatusError added in v0.6.0

func SetOpsStatusError(candidate *opscore.OpsCandidate, reason, message string)

func UpdatePodWithRetry added in v0.6.1

func UpdatePodWithRetry(ctx context.Context, c client.Client, obj client.Object, updateFn func(*corev1.Pod)) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL