Documentation ¶
Index ¶
Constants ¶
View Source
const (
// DriverName is the name of the StorageOS CSI driver.
DriverName = "csi.storageos.com"
)
Variables ¶
View Source
var ( // ErrVolumeAttachmentNotFound is returned when a volume attachment was // expected but not found. ErrVolumeAttachmentNotFound = errors.New("volume attachment not found") // ErrUnexpectedVolumeAttacher is returned when a specific attacher // was expected but different or not specified. ErrUnexpectedVolumeAttacher = errors.New("unexpected volume attacher") // ErrNodeTypeAssertion is returned when a type assertion to convert a // given object into StorageOS Node fails. ErrNodeTypeAssertion = errors.New("failed to convert into StorageOS Node by type assertion") )
View Source
var ( // ErrNodeNotCached is returned if the node was expected in the cache but // not found. ErrNodeNotCached = errors.New("node not found in cache") )
Functions ¶
This section is empty.
Types ¶
type Controller ¶
Controller implements the Stateless-Action controller interface, fencing k8s node pods when they are detected to be unhealthy in StorageOS.
func NewController ¶
func NewController(k8s client.Client, cache *cache.Object, scheme *runtime.Scheme, api NodeFencer, log logr.Logger) (*Controller, error)
NewController returns a Controller that implements pod fencing based on StorageOS node health status.
func (Controller) BuildActionManager ¶
func (c Controller) BuildActionManager(o interface{}) (action.Manager, error)
func (Controller) RequireAction ¶
func (c Controller) RequireAction(ctx context.Context, o interface{}) (bool, error)
type NodeFencer ¶
type NodeFencer interface { ListNodes(ctx context.Context) ([]client.Object, error) GetVolume(ctx context.Context, key client.ObjectKey) (storageos.Object, error) }
NodeFencer provides access to nodes and the volumes running on them.
type Reconciler ¶
type Reconciler struct { client.Client actionv1.Reconciler // contains filtered or unexported fields }
Reconciler reconciles StorageOS Node object health with running Pods, deleting them if we know that they are unable to use their storage.
func NewReconciler ¶
func NewReconciler(api NodeFencer, apiReset chan<- struct{}, k8s client.Client, pollInterval time.Duration, expiryInterval time.Duration) *Reconciler
NewReconciler returns a new Node label reconciler.
The resyncInterval determines how often the periodic resync operation should be run.
Click to show internal directories.
Click to hide internal directories.