Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RetryUpdateOnConflict ¶
func RetryUpdateOnConflict[T any](ctx context.Context, k8s client.Client, key client.ObjectKey, mutator func(*T)) (*T, error)
RetryUpdateOnConflict is a wrapper around client-go/util/retry.RetryOnConflict, adding the following often repeated actions:
1. client.Get a resource for the given key 2. mutate the retrieved object using the given mutator function. 3. client.Update the updated resource and retry on conflict using the client-go/util/retry.DefaultRetry strategy.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.