orphanedpv

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ControllerName = "OrphanedPVController"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller watches all PVs actively belonging to a ScyllaCluster and replace scylla node on any PV that is orphaned, if enabled on the ScyllaCluster. Orphaned PV is a volume that is hard bound to a node that doesn't exist anymore. The controller is based on a ScyllaCluster key and listing matching PVs because using a PV key and trying to find a corresponding ScyllaCluster would be quite hard, there are no ownerRefs and we can't propagate the "enabled" information from a ScyllaCluster to a PVC annotation because PVCs are not reconciled. TODO: When we support auto-replacing nodes, we could replace it with generic controller

deleting PVs bound to nodes that don't exists anymore, without knowing about ScyllaClusters.
It would also process PVs instead of ScyllaClusters which is currently complicating the logic
that has to handle multiple PVs at once, artificial requeues / not watching PVs and different error paths.

func (*Controller) Run

func (opc *Controller) Run(ctx context.Context, workers int)

type PVItem

type PVItem struct {
	PV          *corev1.PersistentVolume
	ServiceName string
}

Jump to

Keyboard shortcuts

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