Versions in this module Expand all Collapse all v1 v1.0.1 Jan 9, 2023 v1.0.0 Jan 6, 2023 Changes in this version + const AnnoSelectedNode + const AnnotationPVAllocatedInfoKey + const AnnotationPodPVCAllocatedNeedMigrateKey + const BPSReadFile + const BPSWriteFile + const Cgroupfs + const DefaultPort + const DefaultSnapshotExpansionSize + const DefaultSnapshotInitialSize + const DefaultSnapshotPrefix + const DefaultSnapshotThreshold + const DeviceName + const EnvExpandSnapInterval + const EnvForceCreateVG + const EnvLogLevel + const EnvSnapshotPrefix + const Ephemeral + const EventCreateVGFailed + const Gi + const IOPSReadFile + const IOPSWriteFile + const KubeBesteffortNameCgroupfs + const KubeBesteffortNameSystemd + const KubeBurstableNameCgroupfs + const KubeBurstableNameSystemd + const KubeRootNameCgroupfs + const KubeRootNameSystemd + const KubernetesNodeIdentityKey + const LabelReschduleTimestamp + const LogDebug + const LogError + const LogFatal + const LogInfo + const LogPanic + const LogTrace + const LogWarn + const Lvm2CopyPercentTag + const Lvm2LVAttrTag + const Lvm2LVKernelMajorTag + const Lvm2LVKernelMinorTag + const Lvm2LVNameTag + const Lvm2LVSizeTag + const Lvm2LVTagsTag + const Lvm2LVUuidTag + const Lvm2PVCountTag + const Lvm2PVFreeTag + const Lvm2PVNameTag + const Lvm2PVSizeTag + const Lvm2PVTagsTag + const Lvm2PVUuidTag + const Lvm2VGFreeTag + const Lvm2VGNameTag + const Lvm2VGSizeTag + const Lvm2VGTagsTag + const Lvm2VGUuidTag + const MPName + const MediaTypeHDD + const MediaTypeSSD + const MediaTypeUnspecified + const Mi + const NsenterCmd + const PVCName + const PVCNameSpace + const PVName + const ParamLVSize + const ParamSnapshotExpansionSize + const ParamSnapshotInitialSize + const ParamSnapshotName + const ParamSnapshotReadonly + const ParamSnapshotThreshold + const ParamVGName + const PendingWithoutScheduledFieldSelector + const PluginService + const ProvisionerName + const ProvisionerService + const RuncRunTimeTag + const RunvRunTimeTag + const Separator + const ServiceType + const StrategyBinpack + const StrategySpread + const Systemd + const TriggerPendingPodCycle + const VGName + const VolumeBPS + const VolumeFSTypeExt3 + const VolumeFSTypeExt4 + const VolumeFSTypeKey + const VolumeFSTypeXFS + const VolumeIOPS + const VolumeMediaType + const VolumeTypeDevice + const VolumeTypeKey + const VolumeTypeLVM + const VolumeTypeMountPoint + const VolumeTypeQuota + const VolumeTypeUnknown + var CgroupPathFormatter = cgroupPathFormatterInSystemd + var Kubeconfig string + var KubeletRootDir = "/var/lib/kubelet" + var MasterURL string + var MountPathWithTLS = "/tls" + var NodeAddrMap = map[string]string + var NodeAddrMutex sync.RWMutex + var SchedulerStrategy = StrategyBinpack + var SupportedFS = []string + var ValidProvisionerNames = []string + var ValidVolumeType = []VolumeType + func AppendJSONData(dataFilePath string, appData map[string]string) error + func CheckParameterValidate(inputs []string) bool + func CheckQuotaPathValidate(kubeClient *kubernetes.Clientset, path string) error + func ConnectorRun(cmd string) (string, error) + func CreateDest(dest string) error + func CreateDestInHost(dest string) error + func DoMountInHost(mntCmd string) error + func EnsureBlock(target string) error + func Fsync(f *os.File) error + func GetAllocateInfoJSONFromPod(pod *corev1.Pod) string + func GetFileContent(fileName string) string + func GetNodeAddr(client kubernetes.Interface, node string, port string) (string, error) + func GetNodeIP(client kubernetes.Interface, nodeID string) (net.IP, error) + func GetPodRunTime(req *csi.NodePublishVolumeRequest, clientSet *kubernetes.Clientset) (string, error) + func GetPvNameFormPodMnt(mntPath string) string + func GetRegionIDAndInstanceID(nodeName string) (string, string, error) + func GetVGNameFromCsiPV(pv *corev1.PersistentVolume) string + func IsBlockDevice(fullPath string) (bool, error) + func IsDir(path string) bool + func IsDirEmpty(name string) (bool, error) + func IsDirTmpfs(path string) bool + func IsFileExisting(filename string) bool + func IsHostFileExist(path string) bool + func IsKataInstall() bool + func IsLikelyNotMountPoint(file string) (bool, error) + func IsMounted(mountPath string) bool + func IsMountedInHost(mountPath string) bool + func IsPathAvailiable(path string) error + func LoadJSONData(dataFileName string) (map[string]string, error) + func MkdirAll(path string, mode fs.FileMode) error + func MountBlock(source, target string, opts ...string) error + func Ping(ipAddress string) (*ping.Statistics, error) + func ReadJSONFile(file string) (map[string]string, error) + func RemoveAll(deletePath string) error + func Run(cmd string) (string, error) + func RunTimeout(cmd string, timeout int) error + func SetNodeAddrMap(key string, value string) + func SetupCgroupPathFormatter(driver CgroupDriverType) + func Umount(mountPath string) error + func UmountInHost(mountPath string) error + func WriteAndSyncFile(filename string, data []byte, perm os.FileMode) error + func WriteJSONFile(obj interface{}, file string) error + func WriteMetricsInfo(metricsPathPrefix string, req *csi.NodePublishVolumeRequest, metricsTop string, ...) + type BindingInfo struct + Device string + Disk string + Node string + PersistentVolumeClaim string + VgName string + VolumeType string + type CgroupDriverType string + func (c CgroupDriverType) Validate() bool + type CommandRunFunc func(cmd string) (string, error) + type MediaType string + type MountPoint struct + Device string + Freq int + Opts []string + Pass int + Path string + Type string + func ListProcMounts() ([]MountPoint, error) + type Mounter interface + EnsureBlock func(target string) error + EnsureFolder func(target string) error + Format func(source, fsType string) error + HasMountRefs func(mountPath string, mountRefs []string) bool + IsFormatted func(source string) (bool, error) + IsMounted func(target string) (bool, error) + IsNotMountPoint func(file string) (bool, error) + Mount func(source, target, fsType string, options ...string) error + MountBlock func(source, target string, options ...string) error + SafePathRemove func(target string) error + Unmount func(target string) error + func NewMounter() Mounter + type NodeAntiAffinityWeight struct + func NewNodeAntiAffinityWeight() *NodeAntiAffinityWeight + func (w *NodeAntiAffinityWeight) Get(volumeType VolumeType) int + func (w *NodeAntiAffinityWeight) Items(copy bool) map[VolumeType]int + func (w *NodeAntiAffinityWeight) Put(volumeType VolumeType, weight int) + type PVAllocatedInfo struct + DeviceName string + VGName string + VolumeType string + func GetAllocatedInfoFromPVAnnotation(pv *corev1.PersistentVolume) (*PVAllocatedInfo, error) + type PVCAllocateInfo struct + PVCName string + PVCNameSpace string + type PodPVCAllocateInfo struct + PvcAllocates map[string]PVCAllocateInfo + func GetAllocateInfoFromPod(pod *corev1.Pod) (*PodPVCAllocateInfo, error) + type Result struct + Device string + Message string + Status string + func Fail(a ...interface{}) Result + func NotSupport(a ...interface{}) Result + func Succeed(a ...interface{}) Result + type StrategyType string + type UpdateStatus string + var UpdateStatusAccepted UpdateStatus = "accepted" + var UpdateStatusFailed UpdateStatus = "failed" + var UpdateStatusPending UpdateStatus = "pending" + type VolumeType string + func VolumeTypeFromString(s string) (VolumeType, error)