blockdevice

package
v1.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	BackingImageByDiskUUID = "longhorn.io/backingimage-by-diskuuid"
	NodeByBlockDeviceName  = "longhorn.io/node-by-blockdevice-name"
	ReplicaByDiskUUID      = "longhorn.io/replica-by-disk-uuid"
	ReplicaByVolume        = "longhorn.io/replica-by-volume"
)

Constants representing the names of the indexes

Variables

This section is empty.

Functions

This section is empty.

Types

type Mutator

type Mutator struct {
	admission.DefaultMutator

	BlockdeviceCache ctldiskv1.BlockDeviceCache
}

func NewBlockdeviceMutator

func NewBlockdeviceMutator(blockdeviceCache ctldiskv1.BlockDeviceCache) *Mutator

func (*Mutator) Resource

func (m *Mutator) Resource() admission.Resource

func (*Mutator) Update

func (m *Mutator) Update(req *admission.Request, oldObj, newObj runtime.Object) (admission.Patch, error)

Update is used to patch the filesystem.provisioned value to spec.provision We move the provision flag from Spec.Filesystem.Provision to Spec.Provision when we introduce the provisioner.

type Validator

type Validator struct {
	admission.DefaultValidator

	BlockdeviceCache ctldiskv1.BlockDeviceCache
	// contains filtered or unexported fields
}

func NewBlockdeviceValidator

func NewBlockdeviceValidator(blockdeviceCache ctldiskv1.BlockDeviceCache, storageClassCache ctlstoragev1.StorageClassCache,
	pvCache ctlcorev1.PersistentVolumeCache, lhVolumeCache lhv1beta2.VolumeCache, lhBackingImageCache lhv1beta2.BackingImageCache,
	lhNodeCache lhv1beta2.NodeCache, lhReplicaCache lhv1beta2.ReplicaCache) *Validator

func (*Validator) Create

func (v *Validator) Create(_ *admission.Request, newObj runtime.Object) error

func (*Validator) Resource

func (v *Validator) Resource() admission.Resource

func (*Validator) Update

func (v *Validator) Update(_ *admission.Request, oldObj, newObj runtime.Object) error

Jump to

Keyboard shortcuts

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