Documentation ¶
Index ¶
- Constants
- func GenJobNameByVolumeId(volumeId string) string
- func NewFuseAbortJob(mountpod *corev1.Pod, devMinor uint32) *batchv1.Job
- func SetJobAsOwner(secret *corev1.Secret, owner batchv1.Job)
- func SetPVCAsOwner(secret *corev1.Secret, owner *corev1.PersistentVolumeClaim)
- func SetPodAsOwner(secret *corev1.Secret, owner corev1.Pod)
- type BaseBuilder
- type CCIBuilder
- type ContainerBuilder
- type JobBuilder
- type PodBuilder
- type ServerlessBuilder
- type SidecarInterface
- func NewCCIBuilder(setting *config.JfsSetting, capacity int64, app corev1.Pod, ...) SidecarInterface
- func NewContainerBuilder(setting *config.JfsSetting, capacity int64) SidecarInterface
- func NewServerlessBuilder(setting *config.JfsSetting, capacity int64) SidecarInterface
- func NewVCIBuilder(setting *config.JfsSetting, capacity int64, app corev1.Pod, ...) SidecarInterface
- type VCIBuilder
- type VCIPropagationStruct
Constants ¶
const ( CCIANNOKey = "virtual-kubelet.io/burst-to-cci" CCIANNOValue = "enforce" CCIDriverName = "juicefs.csi.everest.io" CCIDriverType = "gpath" )
const ( JfsDirName = "jfs-dir" UpdateDBDirName = "updatedb" UpdateDBCfgFile = "/etc/updatedb.conf" )
const ( VCIANNOKey = "vke.volcengine.com/burst-to-vci" VCIANNOValue = "enforce" VCIPropagation = "vci.vke.volcengine.com/config-bidirectional-mount-propagation" VCIPropagationConfig = "vke.al.vci-enable-bidirectional-mount-propagation" VCIPropagationConfigValue = "vke.al.vci-enable-bidirectional-mount-propagation" )
const DefaultJobTTLSecond = int32(5)
Variables ¶
This section is empty.
Functions ¶
func GenJobNameByVolumeId ¶
func NewFuseAbortJob ¶ added in v0.23.6
func SetPVCAsOwner ¶ added in v0.18.0
func SetPVCAsOwner(secret *corev1.Secret, owner *corev1.PersistentVolumeClaim)
Types ¶
type BaseBuilder ¶ added in v0.23.0
type BaseBuilder struct {
// contains filtered or unexported fields
}
func (*BaseBuilder) NewSecret ¶ added in v0.23.0
func (r *BaseBuilder) NewSecret() corev1.Secret
type CCIBuilder ¶ added in v0.23.1
type CCIBuilder struct { ServerlessBuilder // contains filtered or unexported fields }
func (*CCIBuilder) NewMountSidecar ¶ added in v0.23.1
func (r *CCIBuilder) NewMountSidecar() *corev1.Pod
NewMountSidecar generates a pod with a juicefs sidecar in serverless mode 1. no hostpath 2. without privileged container 3. no propagationBidirectional 4. with env JFS_NO_UMOUNT=1 5. annotations for CCI
func (*CCIBuilder) OverwriteVolumeMounts ¶ added in v0.23.1
func (r *CCIBuilder) OverwriteVolumeMounts(mount *corev1.VolumeMount)
func (*CCIBuilder) OverwriteVolumes ¶ added in v0.23.1
func (r *CCIBuilder) OverwriteVolumes(volume *corev1.Volume, mountPath string)
type ContainerBuilder ¶ added in v0.23.0
type ContainerBuilder struct {
PodBuilder
}
func (*ContainerBuilder) NewMountSidecar ¶ added in v0.23.0
func (r *ContainerBuilder) NewMountSidecar() *corev1.Pod
NewMountSidecar generates a pod with a juicefs sidecar exactly the same spec as Mount Pod
func (*ContainerBuilder) OverwriteVolumeMounts ¶ added in v0.23.0
func (r *ContainerBuilder) OverwriteVolumeMounts(mount *corev1.VolumeMount)
func (*ContainerBuilder) OverwriteVolumes ¶ added in v0.23.0
func (r *ContainerBuilder) OverwriteVolumes(volume *corev1.Volume, mountPath string)
type JobBuilder ¶ added in v0.23.0
type JobBuilder struct {
PodBuilder
}
func NewJobBuilder ¶ added in v0.23.0
func NewJobBuilder(setting *config.JfsSetting, capacity int64) *JobBuilder
func (*JobBuilder) NewJobForCleanCache ¶ added in v0.23.0
func (r *JobBuilder) NewJobForCleanCache() *batchv1.Job
func (*JobBuilder) NewJobForCreateVolume ¶ added in v0.23.0
func (r *JobBuilder) NewJobForCreateVolume() *batchv1.Job
func (*JobBuilder) NewJobForDeleteVolume ¶ added in v0.23.0
func (r *JobBuilder) NewJobForDeleteVolume() *batchv1.Job
type PodBuilder ¶ added in v0.23.0
type PodBuilder struct {
BaseBuilder
}
func NewPodBuilder ¶ added in v0.23.0
func NewPodBuilder(setting *config.JfsSetting, capacity int64) *PodBuilder
func (*PodBuilder) NewMountPod ¶ added in v0.23.0
func (r *PodBuilder) NewMountPod(podName string) *corev1.Pod
NewMountPod generates a pod with juicefs client
type ServerlessBuilder ¶ added in v0.23.0
type ServerlessBuilder struct {
PodBuilder
}
func (*ServerlessBuilder) NewMountSidecar ¶ added in v0.23.0
func (r *ServerlessBuilder) NewMountSidecar() *corev1.Pod
NewMountSidecar generates a pod with a juicefs sidecar in serverless mode 1. no hostpath except mount point (the serverless cluster must have this permission.) 2. with privileged container (the serverless cluster must have this permission.) 3. no initContainer
func (*ServerlessBuilder) OverwriteVolumeMounts ¶ added in v0.23.0
func (r *ServerlessBuilder) OverwriteVolumeMounts(mount *corev1.VolumeMount)
func (*ServerlessBuilder) OverwriteVolumes ¶ added in v0.23.0
func (r *ServerlessBuilder) OverwriteVolumes(volume *corev1.Volume, mountPath string)
type SidecarInterface ¶ added in v0.23.0
type SidecarInterface interface { NewMountSidecar() *corev1.Pod NewSecret() corev1.Secret OverwriteVolumes(volume *corev1.Volume, mountPath string) OverwriteVolumeMounts(mount *corev1.VolumeMount) }
func NewCCIBuilder ¶ added in v0.23.1
func NewCCIBuilder(setting *config.JfsSetting, capacity int64, app corev1.Pod, pvc corev1.PersistentVolumeClaim) SidecarInterface
func NewContainerBuilder ¶ added in v0.23.0
func NewContainerBuilder(setting *config.JfsSetting, capacity int64) SidecarInterface
func NewServerlessBuilder ¶ added in v0.23.0
func NewServerlessBuilder(setting *config.JfsSetting, capacity int64) SidecarInterface
func NewVCIBuilder ¶ added in v0.23.0
func NewVCIBuilder(setting *config.JfsSetting, capacity int64, app corev1.Pod, pvc corev1.PersistentVolumeClaim) SidecarInterface
type VCIBuilder ¶ added in v0.23.0
type VCIBuilder struct { ServerlessBuilder // contains filtered or unexported fields }
func (*VCIBuilder) NewMountSidecar ¶ added in v0.23.0
func (r *VCIBuilder) NewMountSidecar() *corev1.Pod
NewMountSidecar generates a pod with a juicefs sidecar in serverless mode 1. no hostpath 2. without privileged container 3. no propagationBidirectional 4. with env JFS_NO_UMOUNT=1 5. annotations for VCI
func (*VCIBuilder) OverwriteVolumeMounts ¶ added in v0.23.0
func (r *VCIBuilder) OverwriteVolumeMounts(mount *corev1.VolumeMount)
func (*VCIBuilder) OverwriteVolumes ¶ added in v0.23.0
func (r *VCIBuilder) OverwriteVolumes(volume *corev1.Volume, mountPath string)