Documentation ¶
Index ¶
Constants ¶
View Source
const ( PodTypeKey = "app.kubernetes.io/name" PodTypeValue = "juicefs-mount" Finalizer = "juicefs.com/finalizer" // DeleteDelayTimeKey mount pod annotation DeleteDelayTimeKey = "juicefs-delete-delay" DeleteDelayAtKey = "juicefs-delete-at" )
Variables ¶
View Source
var ( ByProcess = false // csi driver runs juicefs in process or not EnableManager = false // enable manager or not (only in k8s) FormatInPod = false // put format/auth in pod (only in k8s) Provisioner = false NodeName = "" Namespace = "" PodName = "" MountImage = "" MountLabels = "" HostIp = "" KubeletPort = "" CSIPod = corev1.Pod{} ContainerResource = corev1.ResourceRequirements{} MountPointPath = "/var/lib/juicefs/volume" JFSConfigPath = "/var/lib/juicefs/config" JFSMountPriorityName = "system-node-critical" PodMountBase = "/jfs" MountBase = "/var/lib/jfs" FsType = "juicefs" CliPath = "/usr/bin/juicefs" CeCliPath = "/usr/local/bin/juicefs" CeMountPath = "/bin/mount.juicefs" JfsMountPath = "/sbin/mount.juicefs" ReconcilerInterval = 5 )
View Source
var PodLocks [1024]sync.Mutex
Functions ¶
func GeneratePodTemplate ¶ added in v0.13.0
func GetPodLock ¶
Types ¶
type JfsSetting ¶
type JfsSetting struct { IsCe bool UsePod bool Name string `json:"name"` MetaUrl string `json:"metaurl"` Source string `json:"source"` Storage string `json:"storage"` FormatOptions string `json:"format-options"` // put in secret SecretKey string `json:"secret-key,omitempty"` SecretKey2 string `json:"secret-key2,omitempty"` Token string `json:"token,omitempty"` Passphrase string `json:"passphrase,omitempty"` Envs map[string]string `json:"envs_map,omitempty"` EncryptRsaKey string `json:"encrypt_rsa_key,omitempty"` InitConfig string `json:"initconfig,omitempty"` Configs map[string]string `json:"configs_map,omitempty"` // put in volCtx MountPodCpuLimit string `json:"mount_pod_cpu_limit"` MountPodMemLimit string `json:"mount_pod_mem_limit"` MountPodCpuRequest string `json:"mount_pod_cpu_request"` MountPodMemRequest string `json:"mount_pod_mem_request"` MountPodLabels map[string]string `json:"mount_pod_labels"` MountPodAnnotations map[string]string `json:"mount_pod_annotations"` MountPodServiceAccount string `json:"mount_pod_service_account"` DeletedDelay string `json:"deleted_delay"` // mount VolumeId string // volumeHandle of PV UniqueId string // mount pod name is generated by uniqueId MountPath string // mountPath of mount pod or process mount TargetPath string // which bind to container path Options []string // mount options FormatCmd string // format or auth SubPath string // subPath which is to be created or deleted SecretName string // secret name which is set env in pod }
func ParseSetting ¶
func ParseSetting(secrets, volCtx map[string]string, usePod bool) (*JfsSetting, error)
Click to show internal directories.
Click to hide internal directories.