Documentation ¶
Index ¶
- Constants
- Variables
- func CleanupObjects(ctx context.Context, c client.Client, logger logr.Logger, owner metav1.Object, ...) error
- func EnvFromSecret(secretName string, field string, optional bool) corev1.EnvVar
- func GetAndValidateSecret(ctx context.Context, client client.Client, logger logr.Logger, ...) error
- func MarkForCleanup(owner metav1.Object, obj metav1.Object)
- func NameFor(obj metav1.Object) types.NamespacedName
- func ReconcileBatch(l logr.Logger, reconcileFuncs ...ReconcileFunc) (bool, error)
- type ReconcileFunc
- type SAHandler
Constants ¶
const DefaultSCCName = "volsync-mover"
DefaultSCCName is the default name of the volsync security context constraint
Variables ¶
var SCCName string
SCCName is the name of the SCC to use for the mover Jobs
Functions ¶
func CleanupObjects ¶
func CleanupObjects(ctx context.Context, c client.Client, logger logr.Logger, owner metav1.Object, types []client.Object) error
CleanupObjects deletes all objects that have been marked. The objects to be cleaned up must have been previously marked via MarkForCleanup() and associated with "owner". The "types" array should contain one object of each type to clean up.
func EnvFromSecret ¶
func GetAndValidateSecret ¶
func MarkForCleanup ¶
MarkForCleanup marks the provided "obj" to be deleted at the end of the synchronization iteration.
func ReconcileBatch ¶
func ReconcileBatch(l logr.Logger, reconcileFuncs ...ReconcileFunc) (bool, error)
reconcileBatch steps through a list of reconcile functions until one returns false or an error.
Types ¶
type ReconcileFunc ¶
reconcileFunc is a function that partially reconciles an object. It returns a bool indicating whether reconciling should continue and an error.