common

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VolumePluginName = "kubernetes.io~csi"

	KubeletDataPathEnv        = "KUBELET_DATA_PATH"
	NotRootUserEnableEnv      = "NOT_ROOT_USER_ENABLE"
	MountPointIntervalTimeEnv = "MOUNT_POINT_INTERVAL_TIME"
	PodsHandleConcurrencyEnv  = "PODS_HANDLE_CONCURRENCY"
	PodUpdateIntervalTimeEnv  = "POD_UPDATE_INTERVAL_TIME"
	DefaultUIDEnv             = "DEFAULT_UID_ENV"
	DefaultGIDEnv             = "DEFAULT_GID_ENV"
	K8SConfigPathEnv          = "K8S_CONFIG_PATH"
	K8SClientTimeoutEnv       = "K8S_CLIENT_TIMEOUT"

	DefaultKubeletDataPath       = "/var/lib/kubelet"
	DefaultCheckIntervalTime     = 15
	DefaultK8SClientTimeout      = 0
	DefaultPodsHandleConcurrency = 10
	DefaultUpdateIntervalTime    = 15
	DefaultUID                   = 601
	DefaultGID                   = 601
)

Variables

This section is empty.

Functions

func FsIDToFsNameUsername

func FsIDToFsNameUsername(fsID string) (fsName, username string)

func GetDefaultGID

func GetDefaultGID() int

func GetDefaultUID

func GetDefaultUID() int

func GetK8SConfigPathEnv

func GetK8SConfigPathEnv() string

func GetK8STimeoutEnv

func GetK8STimeoutEnv() int

func GetKubeletDataPath

func GetKubeletDataPath() string

func GetMountPointCheckIntervalTime

func GetMountPointCheckIntervalTime() int

func GetPodUIDFromTargetPath

func GetPodUIDFromTargetPath(targetPath string) string

func GetPodsHandleConcurrency

func GetPodsHandleConcurrency() int

func GetPodsUpdateIntervalTime

func GetPodsUpdateIntervalTime() int

func GetRandID

func GetRandID(randNum int) string

func GetRootToken

func GetRootToken(ctx *logger.RequestContext) (string, error)

func GetSourceMountPathByPod

func GetSourceMountPathByPod(podUID, volumeName string) string

GetSourceMountPathByPod default value: /var/lib/kubelet/pods/{podUID}/volumes/{volumePluginName}/{volumeName}/source

func GetVolumeBindMountPathByPod

func GetVolumeBindMountPathByPod(podUID, volumeName string) string

GetVolumeBindMountPathByPod default value: /var/lib/kubelet/pods/{podUID}/volumes/{volumePluginName}/{volumeName}/mount

func GetVolumeMountPath

func GetVolumeMountPath(pathPrefix string) string

GetVolumeMountPath default value: /var/lib/kubelet/pods/{podUID}/volumes/{volumePluginName}/{volumeName}/mount

func GetVolumeSourceMountPath

func GetVolumeSourceMountPath(pathPrefix string) string

GetVolumeSourceMountPath default value: /var/lib/kubelet/pods/{podUID}/volumes/{volumePluginName}/{volumeName}/source

Types

This section is empty.

Jump to

Keyboard shortcuts

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