controllers

package
v0.0.0-...-eeaf60d Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const O_CREATE = os.O_CREATE
View Source
const O_WRONLY = os.O_WRONLY
View Source
const (
	// StorageClass is the name of StorageClass. It is set to pv.spec.storageClassName.
	StorageClass = "local-storage"
)

Variables

This section is empty.

Functions

func NewDeviceDetector

func NewDeviceDetector(client client.Client, reader client.Reader, log logr.Logger, nodeName string, interval time.Duration, scheme *runtime.Scheme, deleter Deleter, defaultPVSpecConfigMap, workingNamespace string) manager.Runnable

NewDeviceDetector creates a new DeviceDetector.

Types

type Deleter

type Deleter interface {
	Delete(path string) error
}

Deleter clean up the block device

type Device

type Device struct {
	Path          string
	CapacityBytes int64
}

Device is containing information of a device.

type DeviceDetector

type DeviceDetector struct {
	client.Client
	// contains filtered or unexported fields
}

DeviceDetector monitors local devices.

func (*DeviceDetector) Start

func (dd *DeviceDetector) Start(ctx context.Context) error

Start implements controller-runtime's manager.Runnable.

type FileInfo

type FileInfo = os.FileInfo

type FileMode

type FileMode = os.FileMode

type FillDeleter

type FillDeleter struct {
	FillBlockSize uint
	FillCount     uint
}

FillDeleter fills first 100MByte with '\0'

func (*FillDeleter) Delete

func (d *FillDeleter) Delete(path string) error

Delete implements Deleter's method.

type PersistentVolumeReconciler

type PersistentVolumeReconciler struct {
	client.Client
	NodeName string
	Deleter  Deleter
}

PersistentVolumeReconciler reconciles a local PersistentVolume

func (*PersistentVolumeReconciler) Reconcile

Reconcile cleans up released local PV

func (*PersistentVolumeReconciler) SetupWithManager

func (r *PersistentVolumeReconciler) SetupWithManager(mgr ctrl.Manager, nodeName string) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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