pvolumes

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TaskCacheHashName          = "action_cache_hash_name"
	TaskCachePath              = "action_cache_path"
	TaskCacheMame              = "action_cache"
	TaskCacheBasePath          = "/actions/caches"
	TaskCacheCompressionSuffix = ".tar"
	TaskCachePathBasePath      = "{{basePath}}"
	TaskCachePathEndPath       = "{{endPath}}"
)
View Source
const (
	VoLabelKeyContainerPath = "containerPath"
	VoLabelKeyContextPath   = "contextPath"
	VoLabelKeyStageOrder    = "stageOrder"
	VoLabelKeyVolumeID      = "ID"
	VoLabelKeyShareVolume   = "shareVolume"
	VoLabelKeyDiceFileUUID  = "diceFileUUID"
)
View Source
const (
	EnvKeyMesosFetcherURI = "MESOS_FETCHER_URI"
)

Variables

View Source
var (
	ContainerRootDir     = "/.pipeline/container"
	ContainerContextDir  = filepath.Join(ContainerRootDir, "context")
	ContainerMetadataDir = filepath.Join(ContainerRootDir, "metadata")
	ContainerUploadDir   = filepath.Join(ContainerRootDir, "uploaddir")

	ContainerVolumeMountRootDir = "/.pipeline/context"                  // task volume 的挂载目录的父目录
	ContainerDiceFilesDir       = "/.pipeline/container/cms/dice_files" // cms dice files 类型在运行时的挂载目录
)

Functions

func GenerateFakeVolume

func GenerateFakeVolume(namespace string, mountPath string, volumeID *string) apistructs.MetadataField

func GenerateLocalVolume

func GenerateLocalVolume(namespace string, volumeID *string) apistructs.MetadataField

func GenerateTaskCommonBinds

func GenerateTaskCommonBinds(mountPoint string) []apistructs.Bind

GenerateTaskCommonBinds 生成 task 通用 binds

func GenerateTaskDiceFileVolume

func GenerateTaskDiceFileVolume(fileName, fileUUID, fileContainerPath string) apistructs.MetadataField

func GenerateTaskVolume

func GenerateTaskVolume(task spec.PipelineTask, namespace string, volumeID *string) apistructs.MetadataField

func GetAvailableTaskContainerPaths

func GetAvailableTaskContainerPaths(tasks []spec.PipelineTask, currentTask spec.PipelineTask) map[string]string

func GetAvailableTaskContainerWorkdirs

func GetAvailableTaskContainerWorkdirs(tasks []spec.PipelineTask, currentTask spec.PipelineTask) map[string]string

GetAvailableTaskContainerWorkdirs 查询当前存在的所有 Workdir

func GetAvailableTaskOutStorages

func GetAvailableTaskOutStorages(tasks []spec.PipelineTask) []apistructs.MetadataField

func HandleTaskCacheVolumes

func HandleTaskCacheVolumes(p *spec.Pipeline, task *spec.PipelineTask, diceYmlJob *diceyml.Job, mountPoint string)

func Initialize

func Initialize(client *dbclient.Client)

func MakeMesosFetcherURI4AliyunRegistrySecret

func MakeMesosFetcherURI4AliyunRegistrySecret(mountPoint string) string

MakeMesosFetcherURI4AliyunRegistrySecret 生成 DC/OS mesos 下的 fetcherURI,相当于 k8s secret for aliyun docker registry

func MakeTaskContainerDiceFilesPath

func MakeTaskContainerDiceFilesPath(fileName string) string

MakeTaskContainerDiceFilesPath 生成 task 在容器内的文件配置路径

func MakeTaskContainerMetafilePath

func MakeTaskContainerMetafilePath(taskName string) string

MakeTaskContainerMetafilePath 生成 task 在容器内的 metadata 目录

func MakeTaskContainerVolumeMountDir

func MakeTaskContainerVolumeMountDir(taskName string) string

MakeTaskContainerVolumeMountDir 生成 task 在容器内的 volume 挂载点

func MakeTaskContainerWorkdir

func MakeTaskContainerWorkdir(taskName string) string

MakeTaskContainerWorkdir 生成 task 在容器内的 workdir 目录

func ParseDiceYmlJobBinds

func ParseDiceYmlJobBinds(diceYmlJob *diceyml.Job) ([]apistructs.Bind, error)

ParseDiceYmlJobBinds 将 diceYmlJob 里老格式的 binds 转换为新的格式

Types

This section is empty.

Jump to

Keyboard shortcuts

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