controller

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFinalizerPending = errors.New("finalizer pending")

Functions

func GetReadyInstancePod

func GetReadyInstancePod(ctx context.Context, c client.Client, clusterName, namespace string) (*corev1.Pod, error)

func JobCompleted

func JobCompleted(job *batchv1.Job) bool

jobCompleted returns "true" if the Job provided completed successfully. Otherwise it returns "false".

func JobFailed

func JobFailed(job *batchv1.Job) bool

jobFailed returns "true" if the Job provided has failed. Otherwise it returns "false".

func RunFinalizer

func RunFinalizer[T client.Object](ctx context.Context, cl client.Client, obj T, finalizer string, f FinalizerFunc[T]) (bool, error)

Types

type CustomManager

type CustomManager struct {
	manager.Manager
	// contains filtered or unexported fields
}

CustomManager is needed to receive a crunchy controller without modifying the crunchy code. It should be used in the `(r *postgrescluster.Reconciler) SetupWithManager(mgr manager.Manager)` method. A Crunchy controller is received when `controller.New` is called which uses the `Add` method. This manager has a custom `Add` method which additionally sets a controller to the manager if provided.

func (*CustomManager) Add

func (m *CustomManager) Add(r manager.Runnable) error

func (*CustomManager) Controller

func (m *CustomManager) Controller() controller.Controller

type FinalizerFunc

type FinalizerFunc[T client.Object] func(context.Context, T) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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