Documentation
¶
Index ¶
- Constants
- Variables
- func AddOrUpdatePV(r *provCommon.RuntimeConfig, pv *corev1.PersistentVolume)
- func ApplyStorageClass(ctx context.Context, client storageclientv1.StorageClassesGetter, ...) (*storagev1.StorageClass, bool, error)
- func CleanupSymlinks(c client.Client, r *provCommon.RuntimeConfig, ownerLabels map[string]string, ...) error
- func EnqueueOnlyLabeledSubcomponents(components ...string) predicate.Predicate
- func GenerateMountMap(runtimeConfig *provCommon.RuntimeConfig) (sets.Set[string], error)
- func GeneratePVName(file, node, class string) string
- func GetDiskMakerImage() string
- func GetKubeRBACProxyImage() string
- func GetLocalDiskLocationPath() string
- func GetNodeNameEnvVar() string
- func GetOwnedPVs(obj runtime.Object, c client.Client) ([]corev1.PersistentVolume, error)
- func GetPVOwnerSelector(lv *localv1.LocalVolume) labels.Selector
- func GetProvisionedByValue(node corev1.Node) string
- func GetSymLinkSourceAndTarget(dev internal.BlockDevice, symlinkDir string) (string, string, bool, error)
- func GetSymlinkedForCurrentSC(symlinkDir string, kname string) (string, error)
- func GetWatchNamespace() (string, error)
- func HandlePVChange(runtimeConfig *provCommon.RuntimeConfig, pv *corev1.PersistentVolume, ...)
- func HasExistingLocalVolumes(ctx context.Context, client client.Client, symlinkDir string, ...) (string, error)
- func HasMismatchingSymlink(lvdl *v1.LocalVolumeDeviceLink, blockDevice internal.BlockDevice) bool
- func InitMapIfNil(m *map[string]string)
- func IsLocalVolumePV(pv *corev1.PersistentVolume) bool
- func IsLocalVolumeSetPV(pv *corev1.PersistentVolume) bool
- func LocalVolumeKey(lv *localv1.LocalVolume) string
- func LocalVolumeSetKey(lvs *localv1alpha1.LocalVolumeSet) string
- func NodeSelectorMatchesNodeLabels(node *corev1.Node, nodeSelector *corev1.NodeSelector) (bool, error)
- func OwnerHasReleasedPVs(r *provCommon.RuntimeConfig, ownerLabels map[string]string) bool
- func PVMatchesProvisioner(pv *corev1.PersistentVolume, provisionerName string) bool
- func PolicyNotPreferredLVDL(err error) (*v1.LocalVolumeDeviceLink, string, bool)
- func ReleaseAvailablePVs(obj runtime.Object, c client.Client) error
- func ReloadRuntimeConfig(ctx context.Context, client client.Client, request ctrl.Request, ...) error
- func RemovePV(r *provCommon.RuntimeConfig, pv *corev1.PersistentVolume)
- func RoundDownCapacityPretty(capacityBytes int64) int64
- func SyncPVAndLVDL(ctx context.Context, args SyncPVAndLVDLArgs) error
- type ConditionalSymlinkRemoval
- type CurrentBlockDeviceInfo
- type DeviceLinkHandler
- func (dl *DeviceLinkHandler) ApplyStatus(ctx context.Context, pvName, namespace string, ...) (*v1.LocalVolumeDeviceLink, error)
- func (dl *DeviceLinkHandler) FindLVDL(ctx context.Context, lvdlName, namespace string) (*v1.LocalVolumeDeviceLink, error)
- func (dl *DeviceLinkHandler) RecreateSymlinkIfNeeded(ctx context.Context, lvdl *v1.LocalVolumeDeviceLink, symLinkPath string, ...) (*v1.LocalVolumeDeviceLink, error)
- func (dl *DeviceLinkHandler) UpdateDeviceLinks(ctx context.Context, existing *v1.LocalVolumeDeviceLink, ...) (*v1.LocalVolumeDeviceLink, error)
- type LocalVolumeDeviceLinkCache
- func (l *LocalVolumeDeviceLinkCache) AddOrUpdateLVDL(lvdl *v1.LocalVolumeDeviceLink)
- func (l *LocalVolumeDeviceLinkCache) FindLSOManagedDeviceInfo(symlink string, blockDevice internal.BlockDevice) (CurrentBlockDeviceInfo, bool, error)
- func (l *LocalVolumeDeviceLinkCache) IsSynced() bool
- func (l *LocalVolumeDeviceLinkCache) MarkSyncedForTests()
- func (l *LocalVolumeDeviceLinkCache) SeedForTests(lvdl *v1.LocalVolumeDeviceLink)
- func (l *LocalVolumeDeviceLinkCache) Start(ctx context.Context) error
- type PolicyNotPreferredError
- type StorageClassOwnerMap
- func (l *StorageClassOwnerMap) DeregisterStorageClassOwner(storageClass string, name types.NamespacedName)
- func (l *StorageClassOwnerMap) GetStorageClassOwners(storageClass string) []types.NamespacedName
- func (l *StorageClassOwnerMap) RegisterStorageClassOwner(storageClass string, name types.NamespacedName)
- type SyncPVAndLVDLArgs
Constants ¶
const ( // KiB is is 1024 bytes KiB int64 = 1024 // MiB is is 1024 KiB MiB = 1024 * KiB // GiB is 1024 MiB GiB = 1024 * MiB // TiB is 1024 GiB TiB = 1024 * GiB )
const ( // OwnerNamespaceLabel references the owning object's namespace OwnerNamespaceLabel = "local.storage.openshift.io/owner-namespace" // OwnerNameLabel references the owning object OwnerNameLabel = "local.storage.openshift.io/owner-name" // OwnerKindLabel references the owning object's kind OwnerKindLabel = "local.storage.openshift.io/owner-kind" // DiskMakerImageEnv is used by the operator to read the DISKMAKER_IMAGE from the environment DiskMakerImageEnv = "DISKMAKER_IMAGE" // KubeRBACProxyImageEnv is used by the operator to read the KUBE_RBAC_PROXY_IMAGE from the environment KubeRBACProxyImageEnv = "KUBE_RBAC_PROXY_IMAGE" // LocalDiskLocationEnv is passed to the operator to override the LOCAL_DISK_LOCATION host directory LocalDiskLocationEnv = "LOCAL_DISK_LOCATION" // ProvisionerConfigMapName is the name of the local-static-provisioner configmap ProvisionerConfigMapName = "local-provisioner" // DiscoveryNodeLabelKey is the label key on the discovery result CR used to identify the node it belongs to. // the value is the node's name DiscoveryNodeLabel = "discovery-result-node" LocalVolumeStorageClassTemplate = "templates/localvolume-storageclass.yaml" LocalProvisionerConfigMapTemplate = "templates/local-provisioner-configmap.yaml" DiskMakerManagerDaemonSetTemplate = "templates/diskmaker-manager-daemonset.yaml" DiskMakerDiscoveryDaemonSetTemplate = "templates/diskmaker-discovery-daemonset.yaml" MetricsServiceTemplate = "templates/localmetrics/service.yaml" MetricsServiceMonitorTemplate = "templates/localmetrics/service-monitor.yaml" PrometheusRuleTemplate = "templates/localmetrics/prometheus-rule.yaml" // DiskMakerServiceName is the name of the service created for the diskmaker daemon DiskMakerServiceName = "local-storage-diskmaker-metrics" // DiscoveryServiceName is the name of the service created for the diskmaker discovery daemon DiscoveryServiceName = "local-storage-discovery-metrics" // DiskMakerMetricsServingCert is the name of secret created for diskmaker service to store TLS config DiskMakerMetricsServingCert = "diskmaker-metric-serving-cert" // DiscoveryMetricsServingCert is the name of secret created for discovery service to store TLS config DiscoveryMetricsServingCert = "discovery-metric-serving-cert" // LocalVolumeProtectionFinalizer is set to ensure the provisioner daemonset and owning object stick around long // enough to handle the PV reclaim policy. LocalVolumeProtectionFinalizer = "storage.openshift.com/local-volume-protection" // LSOSymlinkDeleterFinalizer is set to ensure diskmaker has a chance // to remove the symlink used by the PV before it is deleted. LSOSymlinkDeleterFinalizer = "storage.openshift.com/lso-symlink-deleter" )
const ( // LocalVolumeOwnerNameForPV stores name of LocalVolume that created this PV LocalVolumeOwnerNameForPV = "storage.openshift.com/local-volume-owner-name" // LocalVolumeOwnerNamespaceForPV stores namespace of LocalVolume that created this PV LocalVolumeOwnerNamespaceForPV = "storage.openshift.com/local-volume-owner-namespace" // PVOwnerKindLabel stores the namespace of the CR that created this PV PVOwnerKindLabel = "storage.openshift.com/owner-kind" // PVOwnerNameLabel stores the name of the CR that created this PV PVOwnerNameLabel = "storage.openshift.com/owner-name" // PVOwnerNamespaceLabel stores the namespace of the CR that created this PV PVOwnerNamespaceLabel = "storage.openshift.com/owner-namespace" // PVDeviceNameLabel is the KNAME of the device PVDeviceNameLabel = "storage.openshift.com/device-name" // PVDeviceIDLabel is the id of the device PVDeviceIDLabel = "storage.openshift.com/device-id" )
const (
// DeviceLinkSymlinkRecreateConditionType is the condition type set on LVDL when symlink recreation fails.
DeviceSymlinkErrorType = "SymlinkRecreateError"
)
Variables ¶
var ( // SymlinkHostDirVolume is the corev1.Volume definition for the lso symlink host directory. // "/mnt/local-storage" is the default, but it can be controlled by env vars. // SymlinkMount is the corresponding mount SymlinkHostDirVolume = corev1.Volume{ Name: "local-disks", VolumeSource: corev1.VolumeSource{ HostPath: &corev1.HostPathVolumeSource{ Path: GetLocalDiskLocationPath(), }, }, } // SymlinkMount is the corresponding mount for SymlinkHostDirVolume SymlinkMount = corev1.VolumeMount{ Name: "local-disks", MountPath: GetLocalDiskLocationPath(), MountPropagation: &hostContainerPropagation, } // DevHostDirVolume is the corev1.Volume definition for the "/dev" bind mount used to // list block devices. // DevMount is the corresponding mount DevHostDirVolume = corev1.Volume{ Name: devDirVolName, VolumeSource: corev1.VolumeSource{ HostPath: &corev1.HostPathVolumeSource{ Path: devDirPath, Type: &directoryHostPath, }, }, } // DevMount is the corresponding mount for DevHostDirVolume DevMount = corev1.VolumeMount{ Name: devDirVolName, MountPath: devDirPath, MountPropagation: &hostContainerPropagation, } // ProvisionerConfigHostDirVolume is the corev1.Volume definition for the // local-static-provisioner configmap // ProvisionerConfigMount is the corresponding mount ProvisionerConfigHostDirVolume = corev1.Volume{ Name: provisionerConfigVolName, VolumeSource: corev1.VolumeSource{ ConfigMap: &corev1.ConfigMapVolumeSource{ LocalObjectReference: corev1.LocalObjectReference{ Name: ProvisionerConfigMapName, }, }, }, } // ProvisionerConfigMount is the corresponding mount for ProvisionerConfigHostDirVolume ProvisionerConfigMount = corev1.VolumeMount{ Name: provisionerConfigVolName, ReadOnly: true, MountPath: "/etc/provisioner/config", } // UDevHostDirVolume is the corev1.Volume definition for the // "/run/udev" host bind-mount. This helps lsblk give more accurate output. // UDevMount is the corresponding mount UDevHostDirVolume = corev1.Volume{ Name: udevVolName, VolumeSource: corev1.VolumeSource{ HostPath: &corev1.HostPathVolumeSource{Path: udevPath}, }, } // UDevMount is the corresponding mount for UDevHostDirVolume UDevMount = corev1.VolumeMount{ Name: udevVolName, MountPath: udevPath, MountPropagation: &hostContainerPropagation, } )
var DeprecatedLabels = []string{PVDeviceNameLabel, PVDeviceIDLabel}
DeprecatedLabels: these labels were deprecated because the potential values weren't all compatible label values they have been move to annotations
var ErrTryAgain = errors.New("retry provisioning")
Functions ¶
func AddOrUpdatePV ¶
func AddOrUpdatePV(r *provCommon.RuntimeConfig, pv *corev1.PersistentVolume)
func ApplyStorageClass ¶
func ApplyStorageClass(ctx context.Context, client storageclientv1.StorageClassesGetter, required *storagev1.StorageClass) (*storagev1.StorageClass, bool, error)
ApplyStorageClass applies the given StorageClass to the cluster if it does not already exist or is different Returns the StorageClass as it exists in the cluster, whether it was created or updated, and any error that occurred.
func CleanupSymlinks ¶
func CleanupSymlinks(c client.Client, r *provCommon.RuntimeConfig, ownerLabels map[string]string, shouldDeleteSymlinkFnArg ConditionalSymlinkRemoval) error
CleanupSymlinks processes deleted PersistentVolumes with the storage.openshift.com/lso-symlink-deleter finalizer, removes the symlink, and then removes the finalizer to allow the PV deletion to complete. The ownerLabels arg allows the caller to only process PV's with those labels. The shouldDeleteSymlinkFnArg callback allows the caller to selectively remove symlinks for a subset of PV's but still remove the finalizer for all of them.
func EnqueueOnlyLabeledSubcomponents ¶
EnqueueOnlyLabeledSubcomponents returns a predicate that filters only objects that have labels["app"] in components
func GenerateMountMap ¶
func GenerateMountMap(runtimeConfig *provCommon.RuntimeConfig) (sets.Set[string], error)
GenerateMountMap is used to get a set of mountpoints that can be quickly looked up
func GeneratePVName ¶
GeneratePVName is used to generate a PV name based on the filename, node, and storageclass Important, this hash value should remain consistent, so this function should not be changed in a way that would change its output.
func GetDiskMakerImage ¶
func GetDiskMakerImage() string
GetDiskMakerImage returns the image to be used for diskmaker daemonset
func GetKubeRBACProxyImage ¶
func GetKubeRBACProxyImage() string
GetKubeRBACProxyImage returns the image to be used for Kube RBAC Proxy sidecar container
func GetLocalDiskLocationPath ¶
func GetLocalDiskLocationPath() string
GetLocalDiskLocationPath return the local disk path
func GetNodeNameEnvVar ¶
func GetNodeNameEnvVar() string
GetNodeNameEnvVar returns the node name from env vars
func GetOwnedPVs ¶
GetOwnedPVs returns a list of PV's owned by the object
func GetPVOwnerSelector ¶
func GetPVOwnerSelector(lv *localv1.LocalVolume) labels.Selector
GetPVOwnerSelector returns selector for selecting pvs owned by given volume
func GetProvisionedByValue ¶
GetProvisionedByValue is the the annotation that indicates which node a PV was originally provisioned on the key is provCommon.AnnProvisionedBy ("pv.kubernetes.io/provisioned-by")
func GetSymLinkSourceAndTarget ¶
func GetSymLinkSourceAndTarget(dev internal.BlockDevice, symlinkDir string) (string, string, bool, error)
GetSymLinkSourceAndTarget returns `source`: the /dev/disk/by-id path of the device if it exists, /dev/KNAME if it doesn't `target`: the path in the symlinkdir to symlink to. device-id if it exists, KNAME if it doesn't `idExists`: is set if the device-id exists `err`
func GetWatchNamespace ¶
GetWatchNamespace returns the namespace the operator should be watching for changes
func HandlePVChange ¶
func HandlePVChange(runtimeConfig *provCommon.RuntimeConfig, pv *corev1.PersistentVolume, q workqueue.TypedRateLimitingInterface[reconcile.Request], watchNamespace string, isDelete bool)
func HasExistingLocalVolumes ¶
func HasExistingLocalVolumes(ctx context.Context, client client.Client, symlinkDir string, blockDevice internal.BlockDevice, pvLinkCache *LocalVolumeDeviceLinkCache) (string, error)
func HasMismatchingSymlink ¶
func HasMismatchingSymlink(lvdl *v1.LocalVolumeDeviceLink, blockDevice internal.BlockDevice) bool
func InitMapIfNil ¶
InitMapIfNil allocates memory to a map if it is nil
func IsLocalVolumePV ¶
func IsLocalVolumePV(pv *corev1.PersistentVolume) bool
func IsLocalVolumeSetPV ¶
func IsLocalVolumeSetPV(pv *corev1.PersistentVolume) bool
func LocalVolumeKey ¶
func LocalVolumeKey(lv *localv1.LocalVolume) string
LocalVolumeKey returns key for the localvolume
func LocalVolumeSetKey ¶
func LocalVolumeSetKey(lvs *localv1alpha1.LocalVolumeSet) string
LocalVolumeSetKey returns key for the localvolumeset
func OwnerHasReleasedPVs ¶
func OwnerHasReleasedPVs(r *provCommon.RuntimeConfig, ownerLabels map[string]string) bool
OwnerHasReleasedPVs returns true if at least one PV in the cache has the provided owner labels and is in the Released phase.
func PVMatchesProvisioner ¶
func PVMatchesProvisioner(pv *corev1.PersistentVolume, provisionerName string) bool
func PolicyNotPreferredLVDL ¶
func PolicyNotPreferredLVDL(err error) (*v1.LocalVolumeDeviceLink, string, bool)
func ReleaseAvailablePVs ¶
ReleaseAvailablePVs releases available PV's owned by the object.
func ReloadRuntimeConfig ¶
func ReloadRuntimeConfig(ctx context.Context, client client.Client, request ctrl.Request, nodeName string, rc *staticProvisioner.RuntimeConfig) error
ReloadRuntimeConfig obtains all values needed by runtime config during Reconcile and writes them to the existing RuntimeConfig provided
func RemovePV ¶
func RemovePV(r *provCommon.RuntimeConfig, pv *corev1.PersistentVolume)
func RoundDownCapacityPretty ¶
RoundDownCapacityPretty rounds down to either the closest GiB or Mib if the resulting value is more than 10 of the respective unit.
func SyncPVAndLVDL ¶
func SyncPVAndLVDL(ctx context.Context, args SyncPVAndLVDLArgs) error
SyncPVAndLVDL ensures the PV exists for a symlinked device and keeps its LocalVolumeDeviceLink in sync.
Types ¶
type ConditionalSymlinkRemoval ¶
type ConditionalSymlinkRemoval func() bool
type CurrentBlockDeviceInfo ¶
type CurrentBlockDeviceInfo struct {
// contains filtered or unexported fields
}
func (CurrentBlockDeviceInfo) RecoverPVSymlinkPath ¶
func (c CurrentBlockDeviceInfo) RecoverPVSymlinkPath(ctx context.Context, symlinkDir, newSymlinkSourcePath string, client client.Client) (string, error)
RecoverPVSymlinkPath finds a symlinkPath in /mnt/local-storage from LVDL for a given newSymlinkSourcePath. If the symlinkPath needs to change and the LVDL policy is not to update existing symlinks, then PolicyNotPreferredError error is returned.
The purpose of this function is to return a new path which may or may not match with actual source specified by newSymlinkSourcePath for existing symlinks. For example - /dev/disk/by-id/wwn-0x12232 newSymlinkSourcePath may generate a targetpath called /mnt/local-storage/foobar/scsi-23232 because scsi-xxx path is already being used by existing volumes.
Arguments: symlinkDir is path in /mnt/local-storage with storageclass name:
example - /mnt/local-storage/foobar/
newSymlinkSourcePath is path in /dev/disk/by-id which points to current device:
example - /dev/disk/by-id/wwn-0x123432
This function MUST be called only when there is no valid symlinks for `newSymlinkSourcePath` in `/mnt/local-storage/<sc>` and yet LSO MUST have created a PV for device pointed by `newSymlinkSourcePath` in previously. So this function is our last resort to find a valid symlink path for PV. Only return valid new SymlinkPath if currentLinkTarget doesn't resolve and user has asked for symlinks to be recreated.
type DeviceLinkHandler ¶
type DeviceLinkHandler struct {
// contains filtered or unexported fields
}
func NewDeviceLinkHandler ¶
func NewDeviceLinkHandler(client client.Client, clientReader client.Reader, recorder record.EventRecorder, cacheWriter *LocalVolumeDeviceLinkCache, nodeName string) (*DeviceLinkHandler, error)
func (*DeviceLinkHandler) ApplyStatus ¶
func (dl *DeviceLinkHandler) ApplyStatus(ctx context.Context, pvName, namespace string, blockDevice internal.BlockDevice, ownerObj runtime.Object, currentSymlink, symlinkPath string) (*v1.LocalVolumeDeviceLink, error)
func (*DeviceLinkHandler) FindLVDL ¶
func (dl *DeviceLinkHandler) FindLVDL(ctx context.Context, lvdlName, namespace string) (*v1.LocalVolumeDeviceLink, error)
func (*DeviceLinkHandler) RecreateSymlinkIfNeeded ¶
func (dl *DeviceLinkHandler) RecreateSymlinkIfNeeded(ctx context.Context, lvdl *v1.LocalVolumeDeviceLink, symLinkPath string, blockDevice internal.BlockDevice) (*v1.LocalVolumeDeviceLink, error)
RecreateSymlinkIfNeeded checks the LVDL policy and atomically recreates the symlink if policy is PreferredLinkTarget and currentLinkTarget != preferredLinkTarget. symLinkPath is the full path under /mnt/local-storage/<storageClass>/<deviceName>. Returns nil if no action is needed or action succeeded, error if action failed. On error, it sets a failure OperatorCondition on the LVDL object.
func (*DeviceLinkHandler) UpdateDeviceLinks ¶
func (dl *DeviceLinkHandler) UpdateDeviceLinks(ctx context.Context, existing *v1.LocalVolumeDeviceLink, blockDevice internal.BlockDevice, currentSymlink, symlinkPath string) (*v1.LocalVolumeDeviceLink, error)
type LocalVolumeDeviceLinkCache ¶
type LocalVolumeDeviceLinkCache struct {
// contains filtered or unexported fields
}
LocalVolumeDeviceLinkCache maintains an in-memory index of LocalVolumeDeviceLink objects keyed by their valid link targets (e.g. /dev/disk/by-id paths). Reconcilers use this cache to recover device-to-PV associations when the on-disk symlink has been lost (e.g. after a node reboot changes /dev/disk/by-id entries), enabling symlink recreation without re-provisioning the PersistentVolume.
func (*LocalVolumeDeviceLinkCache) AddOrUpdateLVDL ¶
func (l *LocalVolumeDeviceLinkCache) AddOrUpdateLVDL(lvdl *v1.LocalVolumeDeviceLink)
AddOrUpdateLVDL updates the in-memory index immediately, enabling write-through cache semantics when called after a successful API server write.
func (*LocalVolumeDeviceLinkCache) FindLSOManagedDeviceInfo ¶
func (l *LocalVolumeDeviceLinkCache) FindLSOManagedDeviceInfo(symlink string, blockDevice internal.BlockDevice) (CurrentBlockDeviceInfo, bool, error)
FindLSOManagedDeviceInfo finds LSO managed device information available about this block device. It checks if device was in-use or managed by LSO. It currently uses LVDLs to determine that.
func (*LocalVolumeDeviceLinkCache) IsSynced ¶
func (l *LocalVolumeDeviceLinkCache) IsSynced() bool
IsSynced returns true once the LVDL informer has synced and event handlers have been registered. Reconcilers should skip cache-dependent work until this returns true.
func (*LocalVolumeDeviceLinkCache) MarkSyncedForTests ¶
func (l *LocalVolumeDeviceLinkCache) MarkSyncedForTests()
MarkSyncedForTests marks the cache as ready without starting informers.
func (*LocalVolumeDeviceLinkCache) SeedForTests ¶
func (l *LocalVolumeDeviceLinkCache) SeedForTests(lvdl *v1.LocalVolumeDeviceLink)
SeedForTests inserts an LVDL entry into the in-memory map. This is used by unit tests that don't run the informer-backed Start() flow.
func (*LocalVolumeDeviceLinkCache) Start ¶
func (l *LocalVolumeDeviceLinkCache) Start(ctx context.Context) error
Start implements manager.Runnable. The manager calls this after its own caches are started, but we still need to wait for the LVDL informer (which may have been dynamically added) to complete its initial sync.
type PolicyNotPreferredError ¶
type PolicyNotPreferredError struct {
SymlinkSource string
SymlinkDir string
PVSymlinkPath string
LVDL *v1.LocalVolumeDeviceLink
}
func (PolicyNotPreferredError) Error ¶
func (e PolicyNotPreferredError) Error() string
type StorageClassOwnerMap ¶
type StorageClassOwnerMap struct {
// contains filtered or unexported fields
}
StorageClassOwnerMap store a one to many association from storageClass to storageclass owner (LocalVolume,LocalVolumeSet,etc), so that one PV/SC event can fan out requests to all owners.
func (*StorageClassOwnerMap) DeregisterStorageClassOwner ¶
func (l *StorageClassOwnerMap) DeregisterStorageClassOwner(storageClass string, name types.NamespacedName)
func (*StorageClassOwnerMap) GetStorageClassOwners ¶
func (l *StorageClassOwnerMap) GetStorageClassOwners(storageClass string) []types.NamespacedName
func (*StorageClassOwnerMap) RegisterStorageClassOwner ¶
func (l *StorageClassOwnerMap) RegisterStorageClassOwner(storageClass string, name types.NamespacedName)
type SyncPVAndLVDLArgs ¶
type SyncPVAndLVDLArgs struct {
LocalVolumeLikeObject runtime.Object
RuntimeConfig *provCommon.RuntimeConfig
StorageClass storagev1.StorageClass
MountPointMap sets.Set[string]
Client client.Client
// symlinkPath points to path on /mnt/local-storage
SymLinkPath string
ExtraLabelsForPV map[string]string
// ClientReader is used to read objects from the apiserver
// skipping cache
ClientReader client.Reader
// BlockDevice is the block device backing this PV.
BlockDevice internal.BlockDevice
// CacheWriter enables write-through updates to the LVDL in-memory cache.
CacheWriter *LocalVolumeDeviceLinkCache
}
SyncPVAndLVDLArgs holds the arguments for PV and LocalVolumeDeviceLink synchronization.