Documentation ¶
Index ¶
- Constants
- Variables
- func ExtractBlockVolumePerformanceLevel(attribute string) (int64, error)
- func ExtractISCSIInformation(attributes map[string]string) (*disk.Disk, error)
- func ExtractISCSIInformationFromMountPath(logger *zap.SugaredLogger, diskPath []string) (*disk.Disk, error)
- func ExtractStorage(capRange *csi.CapacityRange) (int64, error)
- func FindMount(target string) ([]string, error)
- func FormatBytes(inputBytes int64) string
- func GetBlockSizeBytes(logger *zap.SugaredLogger, devicePath string) (int64, error)
- func GetDevicePath(sd *disk.Disk) string
- func GetKubeClient(logger *zap.SugaredLogger, master, kubeconfig string) *kubernetes.Clientset
- func IsFipsEnabled() (string, error)
- func IsInTransitEncryptionPackageInstalled() (bool, error)
- func MaxOfInt(a, b int64) int64
- func Rescan(logger *zap.SugaredLogger, devicePath string) error
- func RoundUpMinSize() int64
- func RoundUpSize(volumeSizeBytes int64, allocationUnitBytes int64) int64
- func ValidateFsType(logger *zap.SugaredLogger, fsType string) string
- type FSSVolumeHandler
- type Util
- func (u *Util) GetAvailableDomainInNodeLabel(fullAD string) string
- func (u *Util) LookupNodeAvailableDomain(k kubernetes.Interface, nodeID string) (string, error)
- func (u *Util) LookupNodeID(k kubernetes.Interface, nodeName string) (string, error)
- func (u *Util) WaitForPathToExist(path string, maxRetries int) bool
- type VolumeLocks
Constants ¶
View Source
const ( // minimumVolumeSizeInBytes is used to validate that the user is not trying // to create a volume that is smaller than what we support MinimumVolumeSizeInBytes int64 = 50 * client.GiB // maximumVolumeSizeInBytes is used to validate that the user is not trying // to create a volume that is larger than what we support MaximumVolumeSizeInBytes int64 = 32 * client.TiB // Block Volume Performance Units VpusPerGB = "vpusPerGB" LowCostPerformanceOption = 0 BalancedPerformanceOption = 10 HigherPerformanceOption = 20 InTransitEncryptionPackageName = "oci-fss-utils" FIPS_ENABLED_FILE_PATH = "/host/proc/sys/crypto/fips_enabled" FINDMNT_COMMAND = "findmnt" CAT_COMMAND = "cat" RPM_COMMAND = "rpm-host" )
Variables ¶
View Source
var ( DiskByPathPatternPV = `/dev/disk/by-path/pci-\w{4}:\w{2}:\w{2}\.\d+-scsi-\d+:\d+:\d+:\d+$` DiskByPathPatternISCSI = `/dev/disk/by-path/ip-[\w\.]+:\d+-iscsi-[\w\.\-:]+-lun-1$` )
Functions ¶
func ExtractBlockVolumePerformanceLevel ¶ added in v1.19.12
Extracts the vpusPerGB as int64 from given string input
func ExtractISCSIInformation ¶
func ExtractStorage ¶
func ExtractStorage(capRange *csi.CapacityRange) (int64, error)
extractStorage extracts the storage size in bytes from the given capacity range. If the capacity range is not satisfied it returns the default volume size. If the capacity range is below or above supported sizes, it returns an error.
func FormatBytes ¶
func GetBlockSizeBytes ¶ added in v1.24.0
func GetBlockSizeBytes(logger *zap.SugaredLogger, devicePath string) (int64, error)
func GetDevicePath ¶
func GetKubeClient ¶
func GetKubeClient(logger *zap.SugaredLogger, master, kubeconfig string) *kubernetes.Clientset
func IsFipsEnabled ¶ added in v1.24.0
func IsInTransitEncryptionPackageInstalled ¶ added in v1.24.0
func RoundUpMinSize ¶
func RoundUpMinSize() int64
func RoundUpSize ¶
func ValidateFsType ¶
func ValidateFsType(logger *zap.SugaredLogger, fsType string) string
Types ¶
type FSSVolumeHandler ¶ added in v1.24.1
type FSSVolumeHandler struct { FilesystemOcid string MountTargetIPAddress string FsExportPath string }
func ValidateFssId ¶ added in v1.24.1
func ValidateFssId(id string) *FSSVolumeHandler
type Util ¶
type Util struct {
Logger *zap.SugaredLogger
}
Util interface
func (*Util) GetAvailableDomainInNodeLabel ¶
convert "zkJl:US-ASHBURN-AD-1" to "US-ASHBURN-AD-1"
func (*Util) LookupNodeAvailableDomain ¶
func (*Util) LookupNodeID ¶
type VolumeLocks ¶
type VolumeLocks struct {
// contains filtered or unexported fields
}
func NewVolumeLocks ¶
func NewVolumeLocks() *VolumeLocks
func (*VolumeLocks) Release ¶
func (vl *VolumeLocks) Release(volumeID string)
func (*VolumeLocks) TryAcquire ¶
func (vl *VolumeLocks) TryAcquire(volumeID string) bool
Click to show internal directories.
Click to hide internal directories.