Documentation ¶
Index ¶
- func EnsureObjectDeleted(ctx context.Context, client k8sclient.Client, object k8sclient.Object) (integreatlyv1alpha1.StatusPhase, error)
- func Exists(ctx context.Context, serverClient k8sclient.Client, obj k8sclient.Object) (bool, error)
- func GetWatchNamespace() (string, error)
- func IsRunInCluster() bool
- func IsRunLocally() bool
- func PatchIfExists(ctx context.Context, serverClient k8sclient.Client, fn controllerutil.MutateFn, ...) (integreatlyv1alpha1.StatusPhase, error)
- func UpdateIfExists(ctx context.Context, serverClient k8sclient.Client, fn controllerutil.MutateFn, ...) (integreatlyv1alpha1.StatusPhase, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureObjectDeleted ¶
func EnsureObjectDeleted(ctx context.Context, client k8sclient.Client, object k8sclient.Object) (integreatlyv1alpha1.StatusPhase, error)
EnsureObjectDeleted attempts to delete a kubernetes object and if it's not found returns PhaseCompleted
func GetWatchNamespace ¶
GetWatchNamespace returns the Namespace the operator should be watching for changes
func IsRunInCluster ¶
func IsRunInCluster() bool
IsRunInCluster checks if the operator is run in cluster
func PatchIfExists ¶
func PatchIfExists(ctx context.Context, serverClient k8sclient.Client, fn controllerutil.MutateFn, obj k8sclient.Object) (integreatlyv1alpha1.StatusPhase, error)
PatchIfExists uses serverClient to retrieve obj by its object key. If obj is not found, it returns InProgress. If obj is found, it applies fn and merge patches the object
func UpdateIfExists ¶
func UpdateIfExists(ctx context.Context, serverClient k8sclient.Client, fn controllerutil.MutateFn, obj k8sclient.Object) (integreatlyv1alpha1.StatusPhase, error)
UpdateIfExists uses serverClient to retrieve obj by it's object key. If obj is not found, it returns InProgress. If obj is found, it applies fn and updates the object
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.