common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	AlluxioRuntime = "alluxio"

	AlluxioMountType = "fuse.alluxio-fuse"

	AlluxioChart = AlluxioRuntime

	AlluxioEngineImpl = AlluxioRuntime
)

Runtime for Alluxio

View Source
const (
	DefaultInitImageEnv = "DEFAULT_INIT_IMAGE_ENV"

	AlluxioRuntimeImageEnv = "ALLUXIO_RUNTIME_IMAGE_ENV"

	AlluxioFuseImageEnv = "ALLUXIO_FUSE_IMAGE_ENV"

	DefaultAlluxioRuntimeImage = "registry.cn-huhehaote.aliyuncs.com/alluxio/alluxio:2.3.0-SNAPSHOT-2c41226"

	DefaultAlluxioFuseImage = "registry.cn-huhehaote.aliyuncs.com/alluxio/alluxio-fuse:2.3.0-SNAPSHOT-2c41226"
)

Constants for Alluxio Images

View Source
const (
	ErrorCreateDataset = "ErrorCreateDataset"

	ErrorProcessDatasetReason = "ErrorProcessDataset"

	ErrorDeleteDataset = "ErrorDeleteDataset"

	ErrorProcessRuntimeReason = "ErrorProcessRuntime"

	ErrorHelmInstall = "ErrorHelmInstall"

	RuntimeScaleInFailed = "RuntimeScaleInFailed"

	Succeed = "Succeed"

	FuseRecoverFailed = "FuseRecoverFailed"

	FuseRecoverSucceed = "FuseRecoverSucceed"

	FuseUmountDuplicate = "UnmountDuplicateMountpoint"

	RuntimeDeprecated = "RuntimeDeprecated"

	RuntimeWithSecretNotSupported = "RuntimeWithSecretNotSupported"
)

Fluid events related to datasets/runtimes

View Source
const (
	TargetDatasetNotFound = "TargetDatasetNotFound"

	TargetDatasetNotReady = "TargetDatasetNotReady"

	TargetDatasetNamespaceNotSame = "TargetDatasetNamespaceNotSame"

	DataOperationNotSupport = "DataOperationNotSupport"

	DataOperationExecutionFailed = "DataOperationExecutionFailed"

	DataOperationFailed = "DataOperationFailed"

	DataOperationSucceed = "DataOperationSucceed"

	DataOperationNotValid = "DataOperationNotValid"

	DataOperationCollision = "DataOperationCollision"

	TargetSSHSecretNameNotSet = "TargetSSHSecretNameNotSet"
)

Events related to all type of Data Operations

View Source
const (
	DataOperationNotFound = "DataOperationNotFound"

	DataOperationWaiting = "DataOperationWaiting"
)

Events related to dataflow

View Source
const (
	DataLoadCollision = "DataLoadCollision"

	RuntimeNotReady = "RuntimeNotReady"

	DataLoadJobStarted = "DataLoadJobStarted"

	DataLoadJobFailed = "DataLoadJobFailed"

	DataLoadJobComplete = "DataLoadJobComplete"
)

Events related to DataLoad

View Source
const (
	DataMigrateCollision = "DataMigrateCollision"

	DataMigrateJobStarted = "DataMigrateJobStarted"

	DataMigrateJobFailed = "DataMigrateJobFailed"

	DataMigrateJobComplete = "DataMigrateJobComplete"
)

Events related to DataMigrate

View Source
const (
	DataProcessProcessorNotSpecified = "ProcessorNotSpecified"

	DataProcessMultipleProcessorSpecified = "MultipleProcessorSpecified"

	DataProcessConflictMountPath = "ConflictMountPath"
)

Events related to DataProcess

View Source
const (
	EnvFuseDeviceResourceName     string = "VFUSE_RESOURCE_NAME"
	DefaultFuseDeviceResourceName string = "fluid.io/fuse"
)
View Source
const (
	RootDirPath            = "/"
	DefaultImagePullPolicy = "IfNotPresent"
	MyPodNamespace         = "MY_POD_NAMESPACE"
	True                   = "true"
	False                  = "false"
	App                    = "app"
	JobPolicy              = "fluid.io/jobPolicy"
	CronPolicy             = "cron"
	PodRoleType            = "role"
	DataloadPod            = "dataload-pod"
	NamespaceFluidSystem   = "fluid-system"
)
View Source
const (
	InjectServerless              = "serverless" + inject             // serverless.fluid.io/inject
	InjectUnprivilegedFuseSidecar = "unprivileged" + injectSidecar    // unprivileged.sidecar.fluid.io/inject
	InjectCacheDir                = "cachedir" + injectSidecar        // cachedir.sidecar.fluid.io/inject
	InjectWorkerSidecar           = "worker" + injectSidecar          // worker.sidecar.fluid.io/inject
	InjectSidecarDone             = "done" + injectSidecar            // done.sidecar.fluid.io/inject
	InjectAppPostStart            = "app.poststart" + inject          // app.poststart.fluid.io/inject
	InjectSidecarPostStart        = "fuse.sidecar.poststart" + inject // fuse.sidecar.poststart.fluid.io/inject

	InjectServerfulFuse = "fuse" + injectServerful

	InjectFuseSidecar = "fuse" + injectSidecar // [Deprecated] fuse.sidecar.fluid.io/inject
)
View Source
const (
	EnvServerlessPlatformKey        = "KEY_SERVERLESS_PLATFORM"
	EnvServerlessPlatformVal        = "VALUE_SERVERLESS_PLATFORM"
	EnvDisableApplicationController = "KEY_DISABLE_APP_CONTROLLER"
	EnvImagePullSecretsKey          = "IMAGE_PULL_SECRETS"
)
View Source
const (
	EFCRuntime = "efc"

	EFCChart = EFCRuntime

	EFCMountType = "alifuse.aliyun-alinas-efc"

	EFCRuntimeResourceFinalizerName = "efc-runtime-controller-finalizer"

	EFCRuntimeControllerName = "EFCRuntimeController"

	EFCEngineImpl = EFCRuntime
)

Runtime for EFC

View Source
const (
	EFCMasterImageEnv = "EFC_MASTER_IMAGE_ENV"

	EFCFuseImageEnv = "EFC_FUSE_IMAGE_ENV"

	EFCWorkerImageEnv = "EFC_WORKER_IMAGE_ENV"

	EFCInitFuseImageEnv = "EFC_INIT_FUSE_IMAGE_ENV"

	DefaultEFCMasterImage = "registry.cn-zhangjiakou.aliyuncs.com/nascache/efc-master:latest"

	DefaultEFCFuseImage = "registry.cn-zhangjiakou.aliyuncs.com/nascache/efc-fuse:latest"

	DefaultEFCWorkerImage = "registry.cn-zhangjiakou.aliyuncs.com/nascache/efc-worker:latest"

	DefaultEFCInitFuseImage = "registry.cn-zhangjiakou.aliyuncs.com/nascache/init-alifuse:latest"
)

Constants for EFC Images

View Source
const (
	SessMgrNamespace = "efc-system"

	SessMgrDaemonSetName = "efc-sessmgr"

	SessMgrNodeSelectorKey = "fluid.io/efc-sessmgr"

	EFCSessMgrImageEnv = "EFC_SESSMGR_IMAGE_ENV"

	EFCSessMgrUpdateStrategyEnv = "EFC_SESSMGR_UPDATE_STRATEGY_ENV"

	DefaultEFCSessMgrImage = "registry.cn-zhangjiakou.aliyuncs.com/nascache/efc-fuse:latest"

	SessMgrSockFile = "sessmgrd.sock"

	VolumeAttrEFCSessMgrWorkDir = "efc_sessmgr_workdir"
)

Constants for EFC SessMgr

View Source
const (
	EnvTimeTrack = "TIME_TRACK"

	EnvTimeTrackDebug = "TIME_TRACK_DEBUG"

	EnvDisableInjection = "DISABLE_INJECTION"

	EnvRuntimeInfoCacheSize = "RUNTIMEINFO_CACHE_SIZE"

	EnvEnableRuntimeInfoCache = "ENABLE_RUNTIMEINFO_CACHE"

	EnvRuntimeInfoCacheTTL = "RUNTIMEINFO_CACHE_TTL"
)
View Source
const (
	GooseFSRuntime = "goosefs"

	GooseFSMountType = "fuse.goosefs-fuse"

	GooseFSNamespace = "goosefs-system"

	GooseFSChart = GooseFSRuntime

	GooseFSEngineImpl = GooseFSRuntime
)

Runtime for GooseFS

View Source
const (
	GooseFSRuntimeImageEnv = "GOOSEFS_RUNTIME_IMAGE_ENV"

	GooseFSFuseImageEnv = "GOOSEFS_FUSE_IMAGE_ENV"

	DefaultGooseFSRuntimeImage = "ccr.ccs.tencentyun.com/qcloud/goosefs:v1.2.0"

	DefaultGooseFSFuseImage = "ccr.ccs.tencentyun.com/qcloud/goosefs-fuse:v1.2.0"
)

Constants for GooseFS images

View Source
const (
	JindoRuntime = "jindo"

	JindoChartName = "jindofs"

	JindoMountType = "fuse.jindofs-fuse"

	JindoDnsServer = "JINDO_DNS_SERVER_ENV"

	JindoFuseMountVolumeName = "jindofs-fuse-mount"

	JindoFSEngineImpl = "jindo"

	JindoFSxEngineImpl = "jindofsx"

	JindoCacheEngineImpl = "jindocache"
)

Runtime for Jindo

View Source
const (
	JindoSmartDataImageEnv = "JINDO_SMARTDATA_IMAGE_ENV"

	JindoFuseImageEnv = "JINDO_FUSE_IMAGE_ENV"
)

Constants for Jindo Images

View Source
const (
	JuiceFSRuntime = "juicefs"

	JuiceFSMountType = "JuiceFS"

	JuiceFSNamespace = "juicefs-system"

	JuiceFSChart = JuiceFSRuntime

	JuiceFSFuseContainer = "juicefs-fuse"

	JuiceFSWorkerContainer = "juicefs-worker"

	JuiceFSEngineImpl = JuiceFSRuntime
)

Runtime for Juice

View Source
const (
	JuiceFSCEImageEnv = "JUICEFS_CE_IMAGE_ENV"
	JuiceFSEEImageEnv = "JUICEFS_EE_IMAGE_ENV"

	DefaultCEImage = "juicedata/juicefs-fuse:ce-v1.1.0-beta2"
	DefaultEEImage = "juicedata/juicefs-fuse:ee-4.9.14"

	NightlyTag = "nightly"
)

Constants for JuiceFS images

View Source
const (
	JuiceFSCeMountPath     = "/bin/mount.juicefs"
	JuiceFSMountPath       = "/sbin/mount.juicefs"
	JuiceCeCliPath         = "/usr/local/bin/juicefs"
	JuiceCliPath           = "/usr/bin/juicefs"
	JuiceFSDefaultCacheDir = "/var/jfsCache"
)

Constants for JuiceFS path conventions

View Source
const (
	// LabelAnnotationPrefix is the prefix of every labels and annotations added by the controller.
	LabelAnnotationPrefix = "fluid.io/"
	// The format is fluid.io/s-{runtime_type}-{data_set_name}, s means storage
	LabelAnnotationStorageCapacityPrefix = LabelAnnotationPrefix + "s-"
	// LabelAnnotationFusePrefix is the prefix for the fuse annotation. The annotation follows
	// fluid.io/f-{runtime type}-{dataset name}, in which f means fuse
	LabelAnnotationFusePrefix = LabelAnnotationPrefix + "f-"
	// The dataset annotation
	LabelAnnotationDataset = LabelAnnotationPrefix + "dataset"
	// LabelAnnotationDatasetNum indicates the number of the dataset in specific node
	LabelAnnotationDatasetNum = LabelAnnotationPrefix + "dataset-num"

	// LabelAnnotationManagedByDeprecated is a deprecated label key for LabelAnnotationManagedBy
	LabelAnnotationManagedByDeprecated = LabelAnnotationPrefix + "wrapped-by"

	// LabelAnnotationManagedBy indicates a pvc that is managed by Fluid
	LabelAnnotationManagedBy = LabelAnnotationPrefix + "managed-by"

	// fluid adminssion webhook inject flag
	EnableFluidInjectionFlag = LabelAnnotationPrefix + "enable-injection"

	// use two lables for name and namespace
	LabelAnnotationDatasetReferringName      = LabelAnnotationDataset + ".referring-name"
	LabelAnnotationDatasetReferringNameSpace = LabelAnnotationDataset + ".referring-namespace"

	RuntimeControllerReplicas = "controller.runtime." + LabelAnnotationPrefix + "replicas"

	// LabelNodePublishMothod is a pv label that indicates the method nodePuhlishVolume use
	LabelNodePublishMothod = LabelAnnotationPrefix + "node-publish-method"
)
View Source
const (
	ThinRuntime = "thin"

	ThinChart = ThinRuntime

	ThinFuseContainer = "thin-fuse"

	ThinWorkerContainer = "thin-worker"

	ThinFuseOptionEnvKey = "MOUNT_OPTIONS"
	ThinFusePointEnvKey  = "MOUNT_POINT"

	ThinMountType = "thin-fuse-mount"

	ThinEngineImpl = ThinRuntime
)
View Source
const (
	FluidFuseBalloonKey = "fluid_fuse_balloon"

	FluidBalloonValue = "true"
)
View Source
const (
	VineyardRuntime = "vineyard"

	VineyardMountType = "vineyard-fuse"

	VineyardChart = VineyardRuntime

	VineyardMasterImageEnv = "VINEYARD_MASTER_IMAGE_ENV"

	VineyardWorkerImageEnv = "VINEYARD_WORKER_IMAGE_ENV"

	VineyardFuseImageEnv = "VINEYARD_FUSE_IMAGE_ENV"

	VineyardFuseIsGlobal = true

	DefaultVineyardMasterImage = "bitnami/etcd:3.5.10"

	DefaultVineyardWorkerImage = "vineyardcloudnative/vineyardd:v0.21.5"

	DefultVineyardFuseImage = "vineyardcloudnative/vineyard-fluid-fuse:v0.21.5"

	VineyardEngineImpl = VineyardRuntime
)

Runtime for Vineyard

View Source
const (
	VolumeAttrFluidPath = "fluid_path"

	VolumeAttrFluidSubPath = "fluid_sub_path"

	VolumeAttrMountType = "mount_type"

	VolumeAttrNamespace = "runtime_namespace"

	VolumeAttrName = "runtime_name"

	CSIDriver = "fuse.csi.fluid.io"

	Fluid = "fluid"

	NodePublishMethod = "node_publish_method"

	NodePublishMethodSymlink = "symlink"
)
View Source
const (
	WebhookName            = "fluid-pod-admission-webhook"
	WebhookServiceName     = "fluid-pod-admission-webhook"
	WebhookSchedulePodPath = "mutate-fluid-io-v1alpha1-schedulepod"

	CertSecretName = "fluid-webhook-certs"

	WebhookPluginFilePath = "/etc/fluid/plugins.profile"
)
View Source
const (
	DefaultInitImage = "registry.cn-hangzhou.aliyuncs.com/fluid/init-users:v0.3.0-1467caa"
)
View Source
const (
	FluidExclusiveKey string = "fluid_exclusive"
)
View Source
const RecommendedKubeConfigPathEnv = "KUBECONFIG"
View Source
const (
	RuntimeFuseHostPIDKey = "runtime.fluid.io/fuse.hostpid"
)

Variables

View Source
var (
	// alluxio ufs root path
	AlluxioMountPathFormat = RootDirPath + "%s"

	AlluxioLocalStorageRootPath   = "/underFSStorage"
	AlluxioLocalStoragePathFormat = AlluxioLocalStorageRootPath + "/%s"
)
View Source
var (
	// goosefs ufs root path
	GooseFSMountPathFormat = RootDirPath + "%s"

	GooseFSLocalStorageRootPath   = "/underFSStorage"
	GooseFSLocalStoragePathFormat = GooseFSLocalStorageRootPath + "/%s"
)
View Source
var (
	FluidStorageClass = Fluid

	FuseContainerName = "fluid-fuse"

	InitFuseContainerName = "init-fluid-fuse"

	FuseMountEnv = "FLUID_FUSE_MOUNTPOINT"
)
View Source
var (
	ExpectedFluidAnnotations = map[string]string{
		"CreatedBy": "fluid",
	}
)
View Source
var (
	// fluid cache label for scheduling pod, format: 'fluid.io/dataset.{dataset name}.sched]'
	LabelAnnotationPodSchedRegex = regexp.MustCompile("^" + LabelAnnotationDataset + "\\.([A-Za-z0-9.-]*)\\.sched$")
)
View Source
var (
	VineyardFuseNodeSelector = map[string]string{}
)

Functions

func CheckExpectValue added in v0.6.0

func CheckExpectValue(m map[string]string, key string, targetValue string) bool

Check if the key has the expected value

func CriticalFusePodEnabled added in v0.7.0

func CriticalFusePodEnabled() bool

func GetDatasetNumLabelName added in v0.6.0

func GetDatasetNumLabelName() string

func GetDefaultTieredStoreOrder

func GetDefaultTieredStoreOrder(MediumType MediumType) (order int)

GetDefaultTieredStoreOrder get the TieredStoreOrder from the default Map because the crd has validated the value, It's not possible to meet unknown MediumType

func GetManagerDatasetFromLabels added in v0.9.0

func GetManagerDatasetFromLabels(labels map[string]string) (datasetName string, exists bool)

func HostPIDEnabled added in v1.0.0

func HostPIDEnabled(annotations map[string]string) bool

HostPIDEnabled check if HostPID is true for runtime fuse pod.

func IsFluidNativeScheme added in v0.6.0

func IsFluidNativeScheme(s string) bool

func IsFluidRefSchema added in v0.9.0

func IsFluidRefSchema(s string) bool

func IsFluidWebScheme added in v0.6.0

func IsFluidWebScheme(s string) bool

func PortCheckEnabled added in v0.7.0

func PortCheckEnabled() bool

Types

type AdmissionHandler added in v0.6.0

type AdmissionHandler interface {
	admission.Handler

	Setup(client client.Client)
}

AdmissionHandler wrappers admission.Handler, but adding client-go capablities

type CacheStateList

type CacheStateList map[CacheStateName]string

ResourceList is a set of (resource name, quantity) pairs.

type CacheStateName

type CacheStateName string

CacheStateName is the name identifying various cacheStateName in a CacheStateNameList.

const (
	// Cached in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
	Cached CacheStateName = "cached"
	// Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
	// Cacheable CacheStateName = "cacheable"
	LowWaterMark CacheStateName = "lowWaterMark"
	// Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
	HighWaterMark CacheStateName = "highWaterMark"
	// NonCacheable size, in bytes (e,g. 5Gi = 5GiB = 5 * 1024 * 1024 * 1024)
	NonCacheable CacheStateName = "nonCacheable"
	// Percentage represents the cache percentage over the total data in the underlayer filesystem.
	// 1.5 = 1500m
	CachedPercentage CacheStateName = "cachedPercentage"

	CacheCapacity CacheStateName = "cacheCapacity"

	// CacheHitRatio defines total cache hit ratio(both local hit and remote hit), it is a metric to learn
	// how much profit a distributed cache brings.
	CacheHitRatio CacheStateName = "cacheHitRatio"

	// LocalHitRatio defines local hit ratio. It represents how many data is requested from local cache worker
	LocalHitRatio CacheStateName = "localHitRatio"

	// RemoteHitRatio defines remote hit ratio. It represents how many data is requested from remote cache worker(s).
	RemoteHitRatio CacheStateName = "remoteHitRatio"

	// CacheThroughputRatio defines total cache hit throughput ratio, both local hit and remote hit are included.
	CacheThroughputRatio CacheStateName = "cacheThroughputRatio"

	// LocalThroughputRatio defines local cache hit throughput ratio.
	LocalThroughputRatio CacheStateName = "localThroughputRatio"

	// RemoteThroughputRatio defines remote cache hit throughput ratio.
	RemoteThroughputRatio CacheStateName = "remoteThroughputRatio"
)

CacheStateName names must be not more than 63 characters, consisting of upper- or lower-case alphanumeric characters, with the -, _, and . characters allowed anywhere, except the first or last character. The default convention, matching that for annotations, is to use lower-case names, with dashes, rather than camel case, separating compound words. Fully-qualified resource typenames are constructed from a DNS-style subdomain, followed by a slash `/` and a name.

type CacheStoreType

type CacheStoreType string
const (
	DiskCacheStore CacheStoreType = "Disk"

	MemoryCacheStore CacheStoreType = "Memory"
)

type Category

type Category string
const (
	AccelerateCategory Category = "Accelerate"
)

type ConditionType added in v0.6.0

type ConditionType string

ConditionType is a valid value for Condition.Type

const (
	// Complete means the task has completed its execution.
	Complete ConditionType = "Complete"
	// Failed means the task has failed its execution.
	Failed ConditionType = "Failed"
)

These are valid conditions of a Task

type FluidApplication added in v0.7.0

type FluidApplication interface {
	GetPodSpecs() (specs []FluidObject, err error)

	SetPodSpecs(specs []FluidObject) (err error)

	// GetObject gets K8s object which can be consumed by K8s API
	GetObject() runtime.Object
}

The Application which is using Fluid, and it has serveral PodSpecs.

type FluidObject added in v0.7.0

type FluidObject interface {
	GetRoot() runtime.Object

	GetVolumes() (volumes []corev1.Volume, err error)

	SetVolumes(volumes []corev1.Volume) (err error)

	GetInitContainers() (containers []corev1.Container, err error)

	GetContainers() (containers []corev1.Container, err error)

	SetContainers(containers []corev1.Container) (err error)

	SetInitContainers(containers []corev1.Container) (err error)

	GetVolumeMounts() (volumeMounts []corev1.VolumeMount, err error)

	SetMetaObject(metaObject metav1.ObjectMeta) (err error)

	GetMetaObject() (metaObject metav1.ObjectMeta, err error)
}

FluidObject simulates the V1 Pod Spec, it has v1.volumes, v1.containers inside

type FluidUFSScheme added in v0.6.0

type FluidUFSScheme string
const (
	// native
	PathScheme   FluidUFSScheme = "local://"
	VolumeScheme FluidUFSScheme = "pvc://"
	// web
	HttpScheme  FluidUFSScheme = "http://"
	HttpsScheme FluidUFSScheme = "https://"
	// ref
	RefSchema FluidUFSScheme = "dataset://"
)

func (FluidUFSScheme) String added in v0.6.0

func (fns FluidUFSScheme) String() string

type FuseInjectionTemplate added in v0.7.0

type FuseInjectionTemplate struct {
	PVCName              string
	SubPath              string
	FuseContainer        corev1.Container
	VolumeMountsToUpdate []corev1.VolumeMount
	VolumeMountsToAdd    []corev1.VolumeMount
	VolumesToUpdate      []corev1.Volume
	VolumesToAdd         []corev1.Volume

	FuseMountInfo FuseMountInfo
}

FuseInjectionTemplate for injecting fuse container into the pod

type FuseMountInfo added in v1.0.0

type FuseMountInfo struct {
	SubPath            string
	HostMountPath      string
	ContainerMountPath string
	FsType             string
}

type FuseSidecarInjectOption added in v0.8.0

type FuseSidecarInjectOption struct {
	EnableCacheDir             bool
	EnableUnprivilegedSidecar  bool
	SkipSidecarPostStartInject bool
}

FuseSidecarInjectOption are options for webhook to inject fuse sidecar containers

func (FuseSidecarInjectOption) String added in v0.8.0

func (f FuseSidecarInjectOption) String() string

type ImageInfo added in v0.6.0

type ImageInfo struct {
	// Image of a Container
	Image string `json:"image" yaml:"image"`
	// ImageTag of a Container
	ImageTag string `json:"imageTag" yaml:"imageTag"`
	// ImagePullPolicy is one of the three policies: `Always`,  `IfNotPresent`, `Never`
	ImagePullPolicy string `json:"imagePullPolicy" yaml:"imagePullPolicy"`
	// ImagePullSecrets
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets" yaml:"imagePullSecrets"`
}

ImageInfo to run a Container

type InitPortCheck added in v0.7.0

type InitPortCheck struct {
	ImageInfo    `yaml:",inline"`
	Enabled      bool   `yaml:"enabled,omitempty"`
	PortsToCheck string `yaml:"portsToCheck,omitempty"`
}

InitPortCheck defines a init container reports port status usage

type InitUsers added in v0.6.0

type InitUsers struct {
	ImageInfo      `yaml:",inline"`
	EnvUsers       string `yaml:"envUsers"`
	Dir            string `yaml:"dir"`
	Enabled        bool   `yaml:"enabled,omitempty"`
	EnvTieredPaths string `yaml:"envTieredPaths"`
}

The InitContainer to init the users for other Containers

type LabelToModify added in v0.6.0

type LabelToModify struct {
	// contains filtered or unexported fields
}

LabelToModify modifies the labelKey in operationType.

func (*LabelToModify) GetLabelKey added in v0.6.0

func (labelToModify *LabelToModify) GetLabelKey() string

func (*LabelToModify) GetLabelValue added in v0.6.0

func (labelToModify *LabelToModify) GetLabelValue() string

func (*LabelToModify) GetOperationType added in v0.6.0

func (labelToModify *LabelToModify) GetOperationType() OperationType

type LabelsToModify added in v0.6.0

type LabelsToModify struct {
	// contains filtered or unexported fields
}

func (*LabelsToModify) Add added in v0.6.0

func (labels *LabelsToModify) Add(labelKey string, labelValue string)

func (*LabelsToModify) Delete added in v0.6.0

func (labels *LabelsToModify) Delete(labelKey string)

func (*LabelsToModify) GetLabels added in v0.6.0

func (labels *LabelsToModify) GetLabels() []LabelToModify

func (*LabelsToModify) Update added in v0.6.0

func (labels *LabelsToModify) Update(labelKey string, labelValue string)

type MediumType

type MediumType string
const (
	Memory MediumType = "MEM"

	SSD MediumType = "SSD"

	HDD MediumType = "HDD"
)

type OperationType added in v0.6.0

type OperationType string
const (
	// AddLabel means adding a new label on the specific node.
	AddLabel OperationType = "Add"

	// DeleteLabel means deleting the label of the specific node.
	DeleteLabel OperationType = "Delete"

	// UpdateLabel means updating the label value of the specific node.
	UpdateLabel OperationType = "UpdateValue"
)

type OwnerReference added in v0.7.0

type OwnerReference struct {
	Enabled bool `json:"enabled" yaml:"enabled"`
	// API version of the referent.
	APIVersion string `json:"apiVersion" yaml:"apiVersion"`
	// Kind of the referent.
	Kind string `json:"kind" yaml:"kind"`
	// Name of the referent.
	Name string `json:"name" yaml:"name"`
	// UID of the referent.
	UID string `json:"uid" yaml:"uid"`
	// If true, this reference points to the managing controller.
	// +optional
	Controller bool `json:"controller" yaml:"controller"`
	// If true, AND if the owner has the "foregroundDeletion" finalizer, then
	// +optional
	BlockOwnerDeletion bool `json:"blockOwnerDeletion" yaml:"blockOwnerDeletion"`
}

type Phase added in v0.6.0

type Phase string

Phase is a valid value of a task stage

const (
	PhaseNone      Phase = ""
	PhasePending   Phase = "Pending"
	PhaseExecuting Phase = "Executing"
	PhaseComplete  Phase = "Complete"
	PhaseFailed    Phase = "Failed"
)

These are possible phases of a Task

type ReadType added in v0.5.0

type ReadType string
const (
	HumanReadType ReadType = "h-"
)

type ResourceList

type ResourceList map[corev1.ResourceName]string

type Resources

type Resources struct {
	Requests ResourceList `json:"requests,omitempty" yaml:"requests,omitempty"`
	Limits   ResourceList `json:"limits,omitempty" yaml:"limits,omitempty"`
}

type RuntimeIdentity added in v0.8.0

type RuntimeIdentity struct {
	Namespace string `yaml:"namespace" json:"namespace"`
	Name      string `yaml:"name" json:"name"`
}

type RuntimeRole

type RuntimeRole string

type StorageType added in v0.5.0

type StorageType string
const (
	MemoryStorageType StorageType = "m-"

	DiskStorageType StorageType = "d-"

	TotalStorageType StorageType = "t-"
)

type UserInfo added in v0.6.0

type UserInfo struct {
	User    int `json:"user" yaml:"user"`
	Group   int `json:"group" yaml:"group"`
	FSGroup int `json:"fsGroup" yaml:"fsGroup"`
}

UserInfo to run a Container

type VolumeType added in v0.8.0

type VolumeType string
const (
	VolumeTypeDefault        VolumeType = ""
	VolumeTypeHostPath       VolumeType = "hostPath"
	VolumeTypeEmptyDir       VolumeType = "emptyDir"
	VolumeTypeVolumeTemplate VolumeType = "volumeTemplate"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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