跳至内容

执行器插件API

信息

版本

0.0.1

内容协商

URI 方案

  • http

消费

  • application/json

生成内容

  • application/json

所有端点

操作

方法 URI 名称 摘要
POST /api/v1/template.execute 执行模板

路径

执行模板 (executeTemplate)

POST /api/v1/template.execute

参数

名称 来源 类型 Go语言类型 分隔符 必填 默认值 描述
Body body ExecuteTemplateArgs models.ExecuteTemplateArgs

所有响应

代码 状态 描述 包含头部 架构
200 成功 schema

响应

200

状态:正常

架构

ExecuteTemplateReply

模型

AWSElasticBlockStoreVolumeSource

在挂载到容器之前,必须存在一个AWS EBS磁盘。该磁盘还必须与kubelet位于相同的AWS可用区。一个AWS EBS磁盘只能以读写方式挂载一次。AWS EBS卷支持所有权管理和SELinux重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
fsType string string fsType is the filesystem type of the volume that you want to mount.Tip: Ensure that the filesystem type is supported by the host operating system.Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstoreTODO: how do we prevent errors in the filesystem from compromising the machine+optional
partition int32 (formatted integer) int32 partition is the partition in the volume that you want to mount.If omitted, the default is to mount by volume name.Examples: For volume /dev/sda1, you specify the partition as "1".Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).+optional
readOnly boolean bool readOnly value true will force the readOnly setting in VolumeMounts.More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore+optional
volumeID string string volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume).More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore

亲和性

属性

名称 类型 Go类型 必填 默认值 描述 示例
nodeAffinity NodeAffinity NodeAffinity
podAffinity PodAffinity PodAffinity
podAntiAffinity PodAntiAffinity PodAntiAffinity

数量

+kubebuilder:validation:Type=number

interface{}

任意字符串

它会将int64、int32、float64、float32、布尔值以及纯字符串解组并表示为字符串。 它会重新组编回字符串 - 组编过程不是对称的。

名称 类型 Go语言类型 默认值 描述 示例
AnyString string string 它能将int64、int32、float64、float32、布尔值和普通字符串反序列化为字符串表示。它会重新序列化为字符串 - 序列化过程不是对称的。

AppArmor配置文件

+union

属性

名称 类型 Go类型 必填 默认值 描述 示例
localhostProfile string string localhostProfile indicates a profile loaded on the node that should be used.The profile must be preconfigured on the node to work.Must match the loaded name of the profile.Must be set if and only if type is "Localhost".+optional
type AppArmorProfileType AppArmorProfileType

AppArmorProfileType

+枚举

名称 类型 Go语言类型 默认值 描述 示例
AppArmorProfileType string string +enum

归档策略

ArchiveStrategy 描述了在保存工件时如何归档文件/目录

属性

名称 类型 Go类型 必填 默认值 描述 示例
none NoneStrategy NoneStrategy
tar TarStrategy TarStrategy
zip ZipStrategy ZipStrategy

参数

模板的参数

属性

名称 类型 Go类型 必填 默认值 描述 示例
artifacts Artifacts Artifacts
parameters []Parameter []*Parameter Parameters is the list of parameters to pass to the template or workflow+patchStrategy=merge+patchMergeKey=name

工件

Artifact 表示要放置在指定路径的工件

属性

名称 类型 Go类型 必填 默认值 描述 示例
archive ArchiveStrategy ArchiveStrategy
archiveLogs boolean bool ArchiveLogs indicates if the container logs should be archived
artifactGC ArtifactGC ArtifactGC
artifactory ArtifactoryArtifact ArtifactoryArtifact
azure AzureArtifact AzureArtifact
deleted boolean bool Has this been deleted?
from string string From allows an artifact to reference an artifact from a previous step
fromExpression string string FromExpression, if defined, is evaluated to specify the value for the artifact
gcs GCSArtifact GCSArtifact
git GitArtifact GitArtifact
globalName string string GlobalName exports an output artifact to the global scope, making it available as'{{workflow.outputs.artifacts.XXXX}} and in workflow.status.outputs.artifacts
hdfs HDFSArtifact HDFSArtifact
http HTTPArtifact HTTPArtifact
mode int32 (formatted integer) int32 mode bits to use on this file, must be a value between 0 and 0777set when loading input artifacts.
name string string name of the artifact. must be unique within a template's inputs/outputs.
optional boolean bool Make Artifacts optional, if Artifacts doesn't generate or exist
oss OSSArtifact OSSArtifact
path string string Path is the container path to the artifact
raw RawArtifact RawArtifact
recurseMode boolean bool If mode is set, apply the permission recursively into the artifact if it is a folder
s3 S3Artifact S3Artifact
subPath string string SubPath allows an artifact to be sourced from a subpath within the specified source

工件垃圾回收

ArtifactGC 描述了如何从已完成的 Workflows 中删除工件 - 这部分内容被嵌入到 WorkflowLevelArtifactGC 中,同时也可用于单个 Artifacts 以根据需要覆盖该设置

属性

名称 类型 Go语言类型 是否必需 默认值 描述 示例
podMetadata Metadata Metadata
serviceAccountName string string ServiceAccountName is an optional field for specifying the Service Account that should be assigned to the Pod doing the deletion
strategy ArtifactGCStrategy ArtifactGCStrategy

ArtifactGC策略

名称 类型 Go类型 默认值 描述 示例
ArtifactGCStrategy string string

工件位置

在输入/输出的上下文中,它被用作单一工件(例如 outputs.artifacts.artname)。 它也用于描述多个工件的位置,例如单个工作流步骤的归档位置,执行器将使用该位置作为存储其文件的默认位置。

属性

名称 类型 Go类型 必填 默认值 描述 示例
archiveLogs boolean bool ArchiveLogs indicates if the container logs should be archived
artifactory ArtifactoryArtifact ArtifactoryArtifact
azure AzureArtifact AzureArtifact
gcs GCSArtifact GCSArtifact
git GitArtifact GitArtifact
hdfs HDFSArtifact HDFSArtifact
http HTTPArtifact HTTPArtifact
oss OSSArtifact OSSArtifact
raw RawArtifact RawArtifact
s3 S3Artifact S3Artifact

工件路径

ArtifactPaths 从一组工件中扩展出一个步骤

属性

名称 类型 Go类型 必填 默认值 描述 示例
archive ArchiveStrategy ArchiveStrategy
archiveLogs boolean bool ArchiveLogs indicates if the container logs should be archived
artifactGC ArtifactGC ArtifactGC
artifactory ArtifactoryArtifact ArtifactoryArtifact
azure AzureArtifact AzureArtifact
deleted boolean bool Has this been deleted?
from string string From allows an artifact to reference an artifact from a previous step
fromExpression string string FromExpression, if defined, is evaluated to specify the value for the artifact
gcs GCSArtifact GCSArtifact
git GitArtifact GitArtifact
globalName string string GlobalName exports an output artifact to the global scope, making it available as'{{workflow.outputs.artifacts.XXXX}} and in workflow.status.outputs.artifacts
hdfs HDFSArtifact HDFSArtifact
http HTTPArtifact HTTPArtifact
mode int32 (formatted integer) int32 mode bits to use on this file, must be a value between 0 and 0777set when loading input artifacts.
name string string name of the artifact. must be unique within a template's inputs/outputs.
optional boolean bool Make Artifacts optional, if Artifacts doesn't generate or exist
oss OSSArtifact OSSArtifact
path string string Path is the container path to the artifact
raw RawArtifact RawArtifact
recurseMode boolean bool If mode is set, apply the permission recursively into the artifact if it is a folder
s3 S3Artifact S3Artifact
subPath string string SubPath allows an artifact to be sourced from a subpath within the specified source

ArtifactoryArtifact

ArtifactoryArtifact 表示一个 Artifactory 工件的存储位置

属性

名称 类型 Go类型 必填 默认值 描述 示例
passwordSecret SecretKeySelector SecretKeySelector
url string string URL of the artifact
usernameSecret SecretKeySelector SecretKeySelector

工件

[]Artifact

AzureArtifact

AzureArtifact 是 Azure 存储工件的位置

属性

名称 类型 Go类型 必填 默认值 描述 示例
accountKeySecret SecretKeySelector SecretKeySelector
blob string string Blob is the blob name (i.e., path) in the container where the artifact resides
container string string Container is the container where resources will be stored
endpoint string string Endpoint is the service url associated with an account. It is most likely "https://.blob.core.windows.net"
useSDKCreds boolean bool UseSDKCreds tells the driver to figure out credentials based on sdk defaults.

Azure数据磁盘缓存模式

+枚举

名称 类型 Go类型 默认值 描述 示例
AzureDataDiskCachingMode string string +enum

Azure数据磁盘类型

+枚举

名称 类型 Go类型 默认值 描述 示例
AzureDataDiskKind string string +enum

AzureDiskVolumeSource

属性

名称 类型 Go类型 必填 默认值 描述 示例
cachingMode AzureDataDiskCachingMode AzureDataDiskCachingMode
diskName string string diskName is the Name of the data disk in the blob storage
diskURI string string diskURI is the URI of data disk in the blob storage
fsType string string fsType is Filesystem type to mount.Must be a filesystem type supported by the host operating system.Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.+optional+default="ext4"
kind AzureDataDiskKind AzureDataDiskKind
readOnly boolean bool readOnly Defaults to false (read/write). ReadOnly here will forcethe ReadOnly setting in VolumeMounts.+optional+default=false

AzureFileVolumeSource

属性

名称 类型 Go类型 必填 默认值 描述 示例
readOnly boolean bool readOnly defaults to false (read/write). ReadOnly here will forcethe ReadOnly setting in VolumeMounts.+optional
secretName string string secretName is the name of secret that contains Azure Storage Account Name and Key
shareName string string shareName is the azure share Name

回退策略

Backoff是retryStrategy中使用的一种回退策略

属性

名称 类型 Go类型 必填 默认值 描述 示例
duration string string Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h")
factor IntOrString IntOrString
maxDuration string string MaxDuration is the maximum amount of time allowed for a workflow in the backoff strategy.It is important to note that if the workflow template includes activeDeadlineSeconds, the pod's deadline is initially set with activeDeadlineSeconds.However, when the workflow fails, the pod's deadline is then overridden by maxDuration.This ensures that the workflow does not exceed the specified maximum duration when retries are involved.

基础认证

BasicAuth 描述了基本身份验证所需的密钥选择器

属性

名称 类型 Go类型 必填 默认值 描述 示例
passwordSecret SecretKeySelector SecretKeySelector
usernameSecret SecretKeySelector SecretKeySelector

CSIVolumeSource

表示由外部CSI驱动程序管理的待挂载卷的源位置

属性

名称 类型 Go类型 必填 默认值 描述 示例
driver string string driver is the name of the CSI driver that handles this volume.Consult with your admin for the correct name as registered in the cluster.
fsType string string fsType to mount. Ex. "ext4", "xfs", "ntfs".If not provided, the empty value is passed to the associated CSI driverwhich will determine the default filesystem to apply.+optional
nodePublishSecretRef LocalObjectReference LocalObjectReference
readOnly boolean bool readOnly specifies a read-only configuration for the volume.Defaults to false (read/write).+optional
volumeAttributes map of string map[string]string volumeAttributes stores driver-specific properties that are passed to the CSIdriver. Consult your driver's documentation for supported values.+optional

缓存

Cache 是用于指定缓存类型的配置

属性

名称 类型 Go语言类型 是否必需 默认值 描述 示例
configMap ConfigMapKeySelector ConfigMapKeySelector

功能

属性

名称 类型 Go类型 必填 默认值 描述 示例
add []Capability []Capability Added capabilities+optional+listType=atomic
drop []Capability []Capability Removed capabilities+optional+listType=atomic

功能

Capability 表示 POSIX 能力类型

名称 类型 Go语言类型 默认值 描述 示例
功能 string string Capability表示POSIX功能类型

CephFSVolumeSource

表示一个在Pod生命周期内持续存在的Ceph文件系统挂载 Cephfs卷不支持所有权管理或SELinux重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
monitors []string []string monitors is Required: Monitors is a collection of Ceph monitorsMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it+listType=atomic
path string string path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /+optional
readOnly boolean bool readOnly is Optional: Defaults to false (read/write). ReadOnly here will forcethe ReadOnly setting in VolumeMounts.More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it+optional
secretFile string string secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secretMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it+optional
secretRef LocalObjectReference LocalObjectReference
user string string user is optional: User is the rados user name, default is adminMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it+optional

CinderVolumeSource

在挂载到容器之前,必须存在一个Cinder卷。 该卷还必须与kubelet位于同一区域。 Cinder卷支持所有权管理和SELinux重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
fsType string string fsType is the filesystem type to mount.Must be a filesystem type supported by the host operating system.Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.More info: https://examples.k8s.io/mysql-cinder-pd/README.md+optional
readOnly boolean bool readOnly defaults to false (read/write). ReadOnly here will forcethe ReadOnly setting in VolumeMounts.More info: https://examples.k8s.io/mysql-cinder-pd/README.md+optional
secretRef LocalObjectReference LocalObjectReference
volumeID string string volumeID used to identify the volume in cinder.More info: https://examples.k8s.io/mysql-cinder-pd/README.md

客户端证书认证

ClientCertAuth 包含通过证书进行客户端认证的必要信息

属性

名称 类型 Go类型 必填 默认值 描述 示例
clientCertSecret SecretKeySelector SecretKeySelector
clientKeySecret SecretKeySelector SecretKeySelector

ClusterTrustBundleProjection

ClusterTrustBundleProjection 描述了如何选择一组 ClusterTrustBundle 对象并将其内容投射到 pod 文件系统中。

属性

名称 类型 Go类型 必填 默认值 描述 示例
labelSelector LabelSelector LabelSelector
name string string Select a single ClusterTrustBundle by object name. Mutually-exclusivewith signerName and labelSelector.+optional
optional boolean bool If true, don't block pod startup if the referenced ClusterTrustBundle(s)aren't available. If using name, then the named ClusterTrustBundle isallowed not to exist. If using signerName, then the combination ofsignerName and labelSelector is allowed to match zeroClusterTrustBundles.+optional
path string string Relative path from the volume root to write the bundle.
signerName string string Select all ClusterTrustBundles that match this signer name.Mutually-exclusive with name. The contents of all selectedClusterTrustBundles will be unified and deduplicated.+optional

ConfigMapEnvSource

目标ConfigMap的Data字段内容将表示键值对作为环境变量。

属性

名称 类型 Go类型 必填 默认值 描述 示例
name string string Name of the referent.This field is effectively required, but due to backwards compatibility isallowed to be empty. Instances of this type with an empty value here arealmost certainly wrong.More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names+optional+default=""+kubebuilder:default=""TODO: Drop kubebuilder:default when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
optional boolean bool Specify whether the ConfigMap must be defined+optional

ConfigMapKeySelector

+structType=atomic

属性

名称 类型 Go类型 必填 默认值 描述 示例
key string string The key to select.
name string string Name of the referent.This field is effectively required, but due to backwards compatibility isallowed to be empty. Instances of this type with an empty value here arealmost certainly wrong.More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names+optional+default=""+kubebuilder:default=""TODO: Drop kubebuilder:default when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
optional boolean bool Specify whether the ConfigMap or its key must be defined+optional

ConfigMap投影

目标ConfigMap的Data字段内容将以文件形式呈现在投影卷中,使用Data字段中的键作为文件名,除非items元素中填充了键到路径的特定映射。请注意,这与没有默认模式的configmap卷源完全相同。

属性

名称 类型 Go类型 必填 默认值 描述 示例
items []KeyToPath []*KeyToPath items if unspecified, each key-value pair in the Data field of the referencedConfigMap will be projected into the volume as a file whose name is thekey and content is the value. If specified, the listed keys will beprojected into the specified paths, and unlisted keys will not bepresent. If a key is specified which is not present in the ConfigMap,the volume setup will error unless it is marked optional. Paths must berelative and may not contain the '..' path or start with '..'.+optional+listType=atomic
name string string Name of the referent.This field is effectively required, but due to backwards compatibility isallowed to be empty. Instances of this type with an empty value here arealmost certainly wrong.More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names+optional+default=""+kubebuilder:default=""TODO: Drop kubebuilder:default when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
optional boolean bool optional specify whether the ConfigMap or its keys must be defined+optional

ConfigMapVolumeSource

目标ConfigMap的Data字段内容将以文件形式挂载到卷中,使用Data字段中的键作为文件名,除非items元素中指定了键到路径的特定映射关系。ConfigMap卷支持所有权管理和SELinux重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
defaultMode int32 (formatted integer) int32 defaultMode is optional: mode bits used to set permissions on created files by default.Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.Defaults to 0644.Directories within the path are not affected by this setting.This might be in conflict with other options that affect the filemode, like fsGroup, and the result can be other mode bits set.+optional
items []KeyToPath []*KeyToPath items if unspecified, each key-value pair in the Data field of the referencedConfigMap will be projected into the volume as a file whose name is thekey and content is the value. If specified, the listed keys will beprojected into the specified paths, and unlisted keys will not bepresent. If a key is specified which is not present in the ConfigMap,the volume setup will error unless it is marked optional. Paths must berelative and may not contain the '..' path or start with '..'.+optional+listType=atomic
name string string Name of the referent.This field is effectively required, but due to backwards compatibility isallowed to be empty. Instances of this type with an empty value here arealmost certainly wrong.More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names+optional+default=""+kubebuilder:default=""TODO: Drop kubebuilder:default when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
optional boolean bool optional specify whether the ConfigMap or its keys must be defined+optional

容器

属性

名称 类型 Go类型 必填 默认值 描述 示例
args []string []string Arguments to the entrypoint.The container image's CMD is used if this is not provided.Variable references $(VAR_NAME) are expanded using the container's environment. If a variablecannot be resolved, the reference in the input string will be unchanged. Double $$ are reducedto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" willproduce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardlessof whether the variable exists or not. Cannot be updated.More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell+optional+listType=atomic
command []string []string Entrypoint array. Not executed within a shell.The container image's ENTRYPOINT is used if this is not provided.Variable references $(VAR_NAME) are expanded using the container's environment. If a variablecannot be resolved, the reference in the input string will be unchanged. Double $$ are reducedto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" willproduce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardlessof whether the variable exists or not. Cannot be updated.More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell+optional+listType=atomic
env []EnvVar []*EnvVar List of environment variables to set in the container.Cannot be updated.+optional+patchMergeKey=name+patchStrategy=merge+listType=map+listMapKey=name
envFrom []EnvFromSource []*EnvFromSource List of sources to populate environment variables in the container.The keys defined within a source must be a C_IDENTIFIER. All invalid keyswill be reported as an event when the container is starting. When a key exists in multiplesources, the value associated with the last source will take precedence.Values defined by an Env with a duplicate key will take precedence.Cannot be updated.+optional+listType=atomic
image string string Container image name.More info: https://kubernetes.io/docs/concepts/containers/imagesThis field is optional to allow higher level config management to default or overridecontainer images in workload controllers like Deployments and StatefulSets.+optional
imagePullPolicy PullPolicy PullPolicy
lifecycle Lifecycle Lifecycle
livenessProbe Probe Probe
name string string Name of the container specified as a DNS_LABEL.Each container in a pod must have a unique name (DNS_LABEL).Cannot be updated.
ports []ContainerPort []*ContainerPort List of ports to expose from the container. Not specifying a port hereDOES NOT prevent that port from being exposed. Any port which islistening on the default "0.0.0.0" address inside a container will beaccessible from the network.Modifying this array with strategic merge patch may corrupt the data.For more information See https://github.com/kubernetes/kubernetes/issues/108255.Cannot be updated.+optional+patchMergeKey=containerPort+patchStrategy=merge+listType=map+listMapKey=containerPort+listMapKey=protocol
readinessProbe Probe Probe
resizePolicy []ContainerResizePolicy []*ContainerResizePolicy Resources resize policy for the container.+featureGate=InPlacePodVerticalScaling+optional+listType=atomic
resources ResourceRequirements ResourceRequirements
restartPolicy ContainerRestartPolicy ContainerRestartPolicy
securityContext SecurityContext SecurityContext
startupProbe Probe Probe
stdin boolean bool Whether this container should allocate a buffer for stdin in the container runtime. If thisis not set, reads from stdin in the container will always result in EOF.Default is false.+optional
stdinOnce boolean bool Whether the container runtime should close the stdin channel after it has been opened bya single attach. When stdin is true the stdin stream will remain open across multiple attachsessions. If stdinOnce is set to true, stdin is opened on container start, is empty until thefirst client attaches to stdin, and then remains open and accepts data until the client disconnects,at which time stdin is closed and remains closed until the container is restarted. If thisflag is false, a container processes that reads from stdin will never receive an EOF.Default is false+optional
terminationMessagePath string string Optional: Path at which the file to which the container's termination messagewill be written is mounted into the container's filesystem.Message written is intended to be brief final status, such as an assertion failure message.Will be truncated by the node if greater than 4096 bytes. The total message length acrossall containers will be limited to 12kb.Defaults to /dev/termination-log.Cannot be updated.+optional
terminationMessagePolicy TerminationMessagePolicy TerminationMessagePolicy
tty boolean bool Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.Default is false.+optional
volumeDevices []VolumeDevice []*VolumeDevice volumeDevices is the list of block devices to be used by the container.+patchMergeKey=devicePath+patchStrategy=merge+listType=map+listMapKey=devicePath+optional
volumeMounts []VolumeMount []*VolumeMount Pod volumes to mount into the container's filesystem.Cannot be updated.+optional+patchMergeKey=mountPath+patchStrategy=merge+listType=map+listMapKey=mountPath
workingDir string string Container's working directory.If not specified, the container runtime's default will be used, whichmight be configured in the container image.Cannot be updated.+optional

容器节点

属性

名称 类型 Go类型 必填 默认值 描述 示例
args []string []string Arguments to the entrypoint.The container image's CMD is used if this is not provided.Variable references $(VAR_NAME) are expanded using the container's environment. If a variablecannot be resolved, the reference in the input string will be unchanged. Double $$ are reducedto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" willproduce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardlessof whether the variable exists or not. Cannot be updated.More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell+optional+listType=atomic
command []string []string Entrypoint array. Not executed within a shell.The container image's ENTRYPOINT is used if this is not provided.Variable references $(VAR_NAME) are expanded using the container's environment. If a variablecannot be resolved, the reference in the input string will be unchanged. Double $$ are reducedto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" willproduce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardlessof whether the variable exists or not. Cannot be updated.More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell+optional+listType=atomic
dependencies []string []string
env []EnvVar []*EnvVar List of environment variables to set in the container.Cannot be updated.+optional+patchMergeKey=name+patchStrategy=merge+listType=map+listMapKey=name
envFrom []EnvFromSource []*EnvFromSource List of sources to populate environment variables in the container.The keys defined within a source must be a C_IDENTIFIER. All invalid keyswill be reported as an event when the container is starting. When a key exists in multiplesources, the value associated with the last source will take precedence.Values defined by an Env with a duplicate key will take precedence.Cannot be updated.+optional+listType=atomic
image string string Container image name.More info: https://kubernetes.io/docs/concepts/containers/imagesThis field is optional to allow higher level config management to default or overridecontainer images in workload controllers like Deployments and StatefulSets.+optional
imagePullPolicy PullPolicy PullPolicy
lifecycle Lifecycle Lifecycle
livenessProbe Probe Probe
name string string Name of the container specified as a DNS_LABEL.Each container in a pod must have a unique name (DNS_LABEL).Cannot be updated.
ports []ContainerPort []*ContainerPort List of ports to expose from the container. Not specifying a port hereDOES NOT prevent that port from being exposed. Any port which islistening on the default "0.0.0.0" address inside a container will beaccessible from the network.Modifying this array with strategic merge patch may corrupt the data.For more information See https://github.com/kubernetes/kubernetes/issues/108255.Cannot be updated.+optional+patchMergeKey=containerPort+patchStrategy=merge+listType=map+listMapKey=containerPort+listMapKey=protocol
readinessProbe Probe Probe
resizePolicy []ContainerResizePolicy []*ContainerResizePolicy Resources resize policy for the container.+featureGate=InPlacePodVerticalScaling+optional+listType=atomic
resources ResourceRequirements ResourceRequirements
restartPolicy ContainerRestartPolicy ContainerRestartPolicy
securityContext SecurityContext SecurityContext
startupProbe Probe Probe
stdin boolean bool Whether this container should allocate a buffer for stdin in the container runtime. If thisis not set, reads from stdin in the container will always result in EOF.Default is false.+optional
stdinOnce boolean bool Whether the container runtime should close the stdin channel after it has been opened bya single attach. When stdin is true the stdin stream will remain open across multiple attachsessions. If stdinOnce is set to true, stdin is opened on container start, is empty until thefirst client attaches to stdin, and then remains open and accepts data until the client disconnects,at which time stdin is closed and remains closed until the container is restarted. If thisflag is false, a container processes that reads from stdin will never receive an EOF.Default is false+optional
terminationMessagePath string string Optional: Path at which the file to which the container's termination messagewill be written is mounted into the container's filesystem.Message written is intended to be brief final status, such as an assertion failure message.Will be truncated by the node if greater than 4096 bytes. The total message length acrossall containers will be limited to 12kb.Defaults to /dev/termination-log.Cannot be updated.+optional
terminationMessagePolicy TerminationMessagePolicy TerminationMessagePolicy
tty boolean bool Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.Default is false.+optional
volumeDevices []VolumeDevice []*VolumeDevice volumeDevices is the list of block devices to be used by the container.+patchMergeKey=devicePath+patchStrategy=merge+listType=map+listMapKey=devicePath+optional
volumeMounts []VolumeMount []*VolumeMount Pod volumes to mount into the container's filesystem.Cannot be updated.+optional+patchMergeKey=mountPath+patchStrategy=merge+listType=map+listMapKey=mountPath
workingDir string string Container's working directory.If not specified, the container runtime's default will be used, whichmight be configured in the container image.Cannot be updated.+optional

容器端口

属性

名称 类型 Go类型 必填 默认值 描述 示例
containerPort int32 (formatted integer) int32 Number of port to expose on the pod's IP address.This must be a valid port number, 0 < x < 65536.
hostIP string string What host IP to bind the external port to.+optional
hostPort int32 (formatted integer) int32 Number of port to expose on the host.If specified, this must be a valid port number, 0 < x < 65536.If HostNetwork is specified, this must match ContainerPort.Most containers do not need this.+optional
name string string If specified, this must be an IANA_SVC_NAME and unique within the pod. Eachnamed port in a pod must have a unique name. Name for the port that can bereferred to by services.+optional
protocol Protocol Protocol

容器调整策略

属性

名称 类型 Go类型 必填 默认值 描述 示例
resourceName ResourceName ResourceName
restartPolicy ResourceResizeRestartPolicy ResourceResizeRestartPolicy

容器重启策略

该设置仅适用于初始化容器,且唯一允许的值为"Always"。

名称 类型 Go语言类型 默认值 描述 示例
ContainerRestartPolicy string string 该属性仅适用于初始化容器,且唯一允许的值为"Always"。

ContainerSet重试策略

ContainerSetRetryStrategy 提供了如何重试容器集的控制选项

属性

名称 类型 Go类型 必填 默认值 描述 示例
duration string string Duration is the time between each retry, examples values are "300ms", "1s" or "5m".Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
retries IntOrString IntOrString

容器集模板

属性

名称 类型 Go类型 必填 默认值 描述 示例
containers []ContainerNode []*ContainerNode
retryStrategy ContainerSetRetryStrategy ContainerSetRetryStrategy
volumeMounts []VolumeMount []*VolumeMount

继续执行条件

可以指定当Pod出现错误、失败或两者都发生时,工作流是否应继续执行。

属性

名称 类型 Go类型 必填 默认值 描述 示例
error boolean bool +optional
failed boolean bool +optional

计数器

Counter 是一个 Prometheus 计数器指标

属性

名称 类型 Go类型 必填 默认值 描述 示例
value string string Value is the value of the metric

创建S3存储桶选项

CreateS3BucketOptions 选项用于确定自动创建存储桶的过程

属性

名称 类型 Go类型 必填 默认值 描述 示例
objectLocking boolean bool ObjectLocking Enable object locking

DAG任务

DAGTask 表示 DAG 执行过程中图中的一个节点

属性

名称 类型 Go类型 必填 默认值 描述 示例
arguments Arguments Arguments
continueOn ContinueOn ContinueOn
dependencies []string []string Dependencies are name of other targets which this depends on
depends string string Depends are name of other targets which this depends on
hooks LifecycleHooks LifecycleHooks
inline Template Template
name string string Name is the name of the target
onExit string string OnExit is a template reference which is invoked at the end of thetemplate, irrespective of the success, failure, or error of theprimary template.DEPRECATED: Use Hooks[exit].Template instead.
template string string Name of template to execute
templateRef TemplateRef TemplateRef
when string string When is an expression in which the task should conditionally execute
withItems []Item []Item WithItems expands a task into multiple parallel tasks from the items in the list
withParam string string WithParam expands a task into multiple parallel tasks from the value in the parameter,which is expected to be a JSON list.
withSequence Sequence Sequence

DAG模板

DAGTemplate 是用于有向无环图模板的模板子类型

属性

名称 类型 Go类型 必填 默认值 描述 示例
failFast boolean bool This flag is for DAG logic. The DAG logic has a built-in "fail fast" feature to stop scheduling new steps,as soon as it detects that one of the DAG nodes is failed. Then it waits until all DAG nodes are completedbefore failing the DAG itself.The FailFast flag default is true, if set to false, it will allow a DAG to run all branches of the DAG tocompletion (either success or failure), regardless of the failed outcomes of branches in the DAG.More info and example about this feature at https://github.com/argoproj/argo-workflows/issues/1442
target string string Target are one or more names of targets to execute in a DAG
tasks []DAGTask []*DAGTask Tasks are a list of DAG tasks+patchStrategy=merge+patchMergeKey=name

数据

数据是一个数据模板

属性

名称 类型 Go类型 必填 默认值 描述 示例
source DataSource DataSource
transformation Transformation Transformation

数据源

DataSource 将外部数据导入数据模板

属性

名称 类型 Go类型 必填 默认值 描述 示例
artifactPaths ArtifactPaths ArtifactPaths

DownwardAPIProjection

请注意,这与没有默认模式的downwardAPI卷源完全相同。

属性

名称 类型 Go类型 必填 默认值 描述 示例
items []DownwardAPIVolumeFile []*DownwardAPIVolumeFile Items is a list of DownwardAPIVolume file+optional+listType=atomic

DownwardAPIVolumeFile

DownwardAPIVolumeFile 表示用于创建包含 Pod 字段文件的信息

属性

名称 类型 Go类型 必填 默认值 描述 示例
fieldRef ObjectFieldSelector ObjectFieldSelector
mode int32 (formatted integer) int32 Optional: mode bits used to set permissions on this file, must be an octal valuebetween 0000 and 0777 or a decimal value between 0 and 511.YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.If not specified, the volume defaultMode will be used.This might be in conflict with other options that affect the filemode, like fsGroup, and the result can be other mode bits set.+optional
path string string Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
resourceFieldRef ResourceFieldSelector ResourceFieldSelector

DownwardAPIVolumeSource

Downward API卷支持所有权管理和SELinux重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
defaultMode int32 (formatted integer) int32 Optional: mode bits to use on created files by default. Must be aOptional: mode bits used to set permissions on created files by default.Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.Defaults to 0644.Directories within the path are not affected by this setting.This might be in conflict with other options that affect the filemode, like fsGroup, and the result can be other mode bits set.+optional
items []DownwardAPIVolumeFile []*DownwardAPIVolumeFile Items is a list of downward API volume file+optional+listType=atomic

持续时间

Duration 是 time.Duration 的封装器,支持正确序列化为 YAML 和 JSON。特别地,它会序列化为字符串格式,这种格式可作为 json 中的映射键使用。

interface{}

EmptyDirVolumeSource

空目录卷支持所有权管理和SELinux重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
medium StorageMedium StorageMedium
sizeLimit Quantity Quantity

环境变量来源

EnvFromSource 表示一组 ConfigMaps 的来源

属性

名称 类型 Go类型 必填 默认值 描述 示例
configMapRef ConfigMapEnvSource ConfigMapEnvSource
prefix string string An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.+optional
secretRef SecretEnvSource SecretEnvSource

环境变量

属性

名称 类型 Go类型 必填 默认值 描述 示例
name string string Name of the environment variable. Must be a C_IDENTIFIER.
value string string Variable references $(VAR_NAME) are expandedusing the previously defined environment variables in the container andany service environment variables. If a variable cannot be resolved,the reference in the input string will be unchanged. Double $$ are reducedto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e."$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".Escaped references will never be expanded, regardless of whether the variableexists or not.Defaults to "".+optional
valueFrom EnvVarSource EnvVarSource

环境变量来源

属性

名称 类型 Go类型 必填 默认值 描述 示例
configMapKeyRef ConfigMapKeySelector ConfigMapKeySelector
fieldRef ObjectFieldSelector ObjectFieldSelector
resourceFieldRef ResourceFieldSelector ResourceFieldSelector
secretKeyRef SecretKeySelector SecretKeySelector

临时卷来源

属性

名称 类型 Go类型 必填 默认值 描述 示例
volumeClaimTemplate PersistentVolumeClaimTemplate PersistentVolumeClaimTemplate

执行动作

属性

名称 类型 Go类型 必填 默认值 描述 示例
command []string []string Command is the command line to execute inside the container, the working directory for thecommand is root ('/') in the container's filesystem. The command is simply exec'd, it isnot run inside a shell, so traditional shell instructions (' ', etc) won't work. To usea shell, you need to explicitly call out to that shell.Exit status of 0 is treated as live/healthy and non-zero is unhealthy.+optional+listType=atomic

ExecuteTemplateArgs 参数

属性

名称 类型 Go类型 必填 默认值 描述 示例
template Template Template
workflow Workflow Workflow

ExecuteTemplateReply 执行模板回复

属性

名称 类型 Go类型 必填 默认值 描述 示例
node NodeResult NodeResult
requeue Duration Duration

ExecutorConfig

属性

名称 类型 Go类型 必填 默认值 描述 示例
serviceAccountName string string ServiceAccountName specifies the service account name of the executor container.

FCVolumeSource

光纤通道卷只能以读写一次的方式挂载。 光纤通道卷支持所有权管理和SELinux重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
fsType string string fsType is the filesystem type to mount.Must be a filesystem type supported by the host operating system.Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.TODO: how do we prevent errors in the filesystem from compromising the machine+optional
lun int32 (formatted integer) int32 lun is Optional: FC target lun number+optional
readOnly boolean bool readOnly is Optional: Defaults to false (read/write). ReadOnly here will forcethe ReadOnly setting in VolumeMounts.+optional
targetWWNs []string []string targetWWNs is Optional: FC target worldwide names (WWNs)+optional+listType=atomic
wwids []string []string wwids Optional: FC volume world wide identifiers (wwids)Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.+optional+listType=atomic

FieldsV1

每个键要么是一个代表字段本身的'.'(始终映射到一个空集),要么是表示子字段或项目的字符串。该字符串将遵循以下四种格式之一: 'f:',其中是结构体中的字段名或映射中的键名 'v:',其中是列表项的确切JSON格式值 'i:',其中是列表中项目的位置 'k:',其中是列表项的键字段到其唯一值的映射 如果某个键映射到一个空的Fields值,则表示该键所代表的字段属于该集合。

确切格式定义在 sigs.k8s.io/structured-merge-diff +protobuf.options.(gogoproto.goproto_stringer)=false

interface{}

FlexVolumeSource

FlexVolume 表示一种通用的卷资源,它通过基于 exec 的插件进行配置/挂载。

属性

名称 类型 Go类型 必填 默认值 描述 示例
driver string string driver is the name of the driver to use for this volume.
fsType string string fsType is the filesystem type to mount.Must be a filesystem type supported by the host operating system.Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.+optional
options map of string map[string]string options is Optional: this field holds extra command options if any.+optional
readOnly boolean bool readOnly is Optional: defaults to false (read/write). ReadOnly here will forcethe ReadOnly setting in VolumeMounts.+optional
secretRef LocalObjectReference LocalObjectReference

Flocker卷源

datasetName 和 datasetUUID 中必须且只能设置其中一个。 Flocker 卷不支持所有权管理或 SELinux 重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
datasetName string string datasetName is Name of the dataset stored as metadata -> name on the dataset for Flockershould be considered as deprecated+optional
datasetUUID string string datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset+optional

GCEPersistentDiskVolumeSource

在挂载到容器之前,GCE PD必须已存在。该磁盘还必须与kubelet位于相同的GCE项目和区域中。GCE PD只能以读写模式挂载一次或以只读模式挂载多次。GCE PD支持所有权管理和SELinux重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
fsType string string fsType is filesystem type of the volume that you want to mount.Tip: Ensure that the filesystem type is supported by the host operating system.Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdiskTODO: how do we prevent errors in the filesystem from compromising the machine+optional
partition int32 (formatted integer) int32 partition is the partition in the volume that you want to mount.If omitted, the default is to mount by volume name.Examples: For volume /dev/sda1, you specify the partition as "1".Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk+optional
pdName string string pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE.More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
readOnly boolean bool readOnly here will force the ReadOnly setting in VolumeMounts.Defaults to false.More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk+optional

GCSArtifact

GCSArtifact 是 GCS 存储产物的位置

属性

名称 类型 Go类型 必填 默认值 描述 示例
bucket string string Bucket is the name of the bucket
key string string Key is the path in the bucket where the artifact resides
serviceAccountKeySecret SecretKeySelector SecretKeySelector

GRPCAction

属性

名称 类型 Go类型 必填 默认值 描述 示例
port int32 (formatted integer) int32 Port number of the gRPC service. Number must be in the range 1 to 65535.
service string string Service is the name of the service to place in the gRPC HealthCheckRequest(see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).If this is not specified, the default behavior is defined by gRPC.+optional+default=""

仪表盘

Gauge 是一种 Prometheus 指标类型

属性

名称 类型 Go类型 必填 默认值 描述 示例
operation GaugeOperation GaugeOperation
realtime boolean bool Realtime emits this metric in real time if applicable
value string string Value is the value to be used in the operation with the metric's current value. If no operation is set,value is the value of the metric

GaugeOperation

名称 类型 Go语言类型 默认值 描述 示例
GaugeOperation string string

Git代码库工件

GitArtifact 是一个 git 工件的位置

属性

名称 类型 Go类型 必填 默认值 描述 示例
branch string string Branch is the branch to fetch when SingleBranch is enabled
depth uint64 (formatted integer) uint64 Depth specifies clones/fetches should be shallow and include the givennumber of commits from the branch tip
disableSubmodules boolean bool DisableSubmodules disables submodules during git clone
fetch []string []string Fetch specifies a number of refs that should be fetched before checkout
insecureIgnoreHostKey boolean bool InsecureIgnoreHostKey disables SSH strict host key checking during git clone
insecureSkipTLS boolean bool InsecureSkipTLS disables server certificate verification resulting in insecure HTTPS connections
passwordSecret SecretKeySelector SecretKeySelector
repo string string Repo is the git repository
revision string string Revision is the git commit, tag, branch to checkout
singleBranch boolean bool SingleBranch enables single branch clone, using the branch parameter
sshPrivateKeySecret SecretKeySelector SecretKeySelector
usernameSecret SecretKeySelector SecretKeySelector

GitRepo卷来源

已弃用:GitRepo 已被弃用。如需在容器中提供 git 仓库,请将 EmptyDir 挂载到 InitContainer 中,该 InitContainer 会使用 git 克隆仓库,然后将 EmptyDir 挂载到 Pod 的容器中。

属性

名称 类型 Go类型 必填 默认值 描述 示例
directory string string directory is the target directory name.Must not contain or start with '..'. If '.' is supplied, the volume directory will be thegit repository. Otherwise, if specified, the volume will contain the git repository inthe subdirectory with the given name.+optional
repository string string repository is the URL
revision string string revision is the commit hash for the specified revision.+optional

GlusterfsVolumeSource

Glusterfs卷不支持所有权管理或SELinux重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
endpoints string string endpoints is the endpoint name that details Glusterfs topology.More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
path string string path is the Glusterfs volume path.More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
readOnly boolean bool readOnly here will force the Glusterfs volume to be mounted with read-only permissions.Defaults to false.More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod+optional

HDFSArtifact

HDFSArtifact 是 HDFS 存储文件的位置

属性

名称 类型 Go类型 必填 默认值 描述 示例
addresses []string []string Addresses is accessible addresses of HDFS name nodes
dataTransferProtection string string DataTransferProtection is the protection level for HDFS data transfer.It corresponds to the dfs.data.transfer.protection configuration in HDFS.
force boolean bool Force copies a file forcibly even if it exists
hdfsUser string string HDFSUser is the user to access HDFS file system.It is ignored if either ccache or keytab is used.
krbCCacheSecret SecretKeySelector SecretKeySelector
krbConfigConfigMap ConfigMapKeySelector ConfigMapKeySelector
krbKeytabSecret SecretKeySelector SecretKeySelector
krbRealm string string KrbRealm is the Kerberos realm used with Kerberos keytabIt must be set if keytab is used.
krbServicePrincipalName string string KrbServicePrincipalName is the principal name of Kerberos serviceIt must be set if either ccache or keytab is used.
krbUsername string string KrbUsername is the Kerberos username used with Kerberos keytabIt must be set if keytab is used.
path string string Path is a file path in HDFS

HTTP

属性

名称 类型 Go类型 必填 默认值 描述 示例
body string string Body is content of the HTTP Request
bodyFrom HTTPBodySource HTTPBodySource
headers HTTPHeaders HTTPHeaders
insecureSkipVerify boolean bool InsecureSkipVerify is a bool when if set to true will skip TLS verification for the HTTP client
method string string Method is HTTP methods for HTTP Request
successCondition string string SuccessCondition is an expression if evaluated to true is considered successful
timeoutSeconds int64 (formatted integer) int64 TimeoutSeconds is request timeout for HTTP Request. Default is 30 seconds
url string string URL of the HTTP Request

HTTPArtifact

HTTPArtifact 允许将 HTTP 服务器上的文件作为输入工件放置在容器中

属性

名称 类型 Go类型 必填 默认值 描述 示例
auth HTTPAuth HTTPAuth
headers []Header []*Header Headers are an optional list of headers to send with HTTP requests for artifacts
url string string URL of the artifact

HTTP认证

属性

名称 类型 Go类型 必填 默认值 描述 示例
basicAuth BasicAuth BasicAuth
clientCert ClientCertAuth ClientCertAuth
oauth2 OAuth2Auth OAuth2Auth

HTTPBodySource

属性

名称 类型 Go类型 必填 默认值 描述 示例
bytes []uint8 (formatted integer) []uint8

HTTPGet操作

属性

名称 类型 Go类型 必填 默认值 描述 示例
host string string Host name to connect to, defaults to the pod IP. You probably want to set"Host" in httpHeaders instead.+optional
httpHeaders []HTTPHeader []*HTTPHeader Custom headers to set in the request. HTTP allows repeated headers.+optional+listType=atomic
path string string Path to access on the HTTP server.+optional
port IntOrString IntOrString
scheme URIScheme URIScheme

HTTP头部

属性

名称 类型 Go类型 必填 默认值 描述 示例
name string string
value string string
valueFrom HTTPHeaderSource HTTPHeaderSource

HTTPHeaderSource

属性

名称 类型 Go类型 必填 默认值 描述 示例
secretKeyRef SecretKeySelector SecretKeySelector

HTTP请求头

[]HTTPHeader

Header 表示在通过 HTTP 获取工件时要使用的键值请求头

属性

名称 类型 Go类型 必填 默认值 描述 示例
name string string Name is the header name
value string string Value is the literal value to use for the header

直方图

直方图是一种Histogram类型的Prometheus指标

属性

名称 类型 Go类型 必填 默认值 描述 示例
buckets []Amount []Amount Buckets is a list of bucket divisors for the histogram
value string string Value is the value of the metric

主机别名

HostAlias 保存了 IP 和主机名之间的映射关系,这些映射将作为条目注入到 pod 的 hosts 文件中。

属性

名称 类型 Go类型 必填 默认值 描述 示例
hostnames []string []string Hostnames for the above IP address.+listType=atomic
ip string string IP address of the host file entry.+required

HostPath类型

+枚举

名称 类型 Go语言类型 默认值 描述 示例
HostPathType string string +enum

HostPathVolumeSource

主机路径卷不支持所有权管理或SELinux重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
path string string path of the directory on the host.If the path is a symlink, it will follow the link to the real path.More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
type HostPathType HostPathType

ISCSIVolumeSource

ISCSI卷只能以读写方式挂载一次。 ISCSI卷支持所有权管理和SELinux重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
chapAuthDiscovery boolean bool chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication+optional
chapAuthSession boolean bool chapAuthSession defines whether support iSCSI Session CHAP authentication+optional
fsType string string fsType is the filesystem type of the volume that you want to mount.Tip: Ensure that the filesystem type is supported by the host operating system.Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsiTODO: how do we prevent errors in the filesystem from compromising the machine+optional
initiatorName string string initiatorName is the custom iSCSI Initiator Name.If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface: will be created for the connection.+optional
iqn string string iqn is the target iSCSI Qualified Name.
iscsiInterface string string iscsiInterface is the interface Name that uses an iSCSI transport.Defaults to 'default' (tcp).+optional+default="default"
lun int32 (formatted integer) int32 lun represents iSCSI Target Lun number.
portals []string []string portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the portis other than default (typically TCP ports 860 and 3260).+optional+listType=atomic
readOnly boolean bool readOnly here will force the ReadOnly setting in VolumeMounts.Defaults to false.+optional
secretRef LocalObjectReference LocalObjectReference
targetPortal string string targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the portis other than default (typically TCP ports 860 and 3260).

ImageVolumeSource

属性

名称 类型 Go类型 必填 默认值 描述 示例
pullPolicy PullPolicy PullPolicy
reference string string Required: Image or artifact reference to be used.Behaves in the same way as pod.spec.containers[*].image.Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets.More info: https://kubernetes.io/docs/concepts/containers/imagesThis field is optional to allow higher level config management to default or overridecontainer images in workload controllers like Deployments and StatefulSets.+optional

输入

输入是将参数、工件、卷从一个模板传递到另一个模板的机制

属性

名称 类型 Go类型 必填 默认值 描述 示例
artifacts Artifacts Artifacts
parameters []Parameter []*Parameter Parameters are a list of parameters passed as inputs+patchStrategy=merge+patchMergeKey=name

IntOrString

+protobuf=true +protobuf.options.(gogoproto.goproto_stringer)=false +k8s:openapi-gen=true

属性

名称 类型 Go类型 必填 默认值 描述 示例
IntVal int32 (formatted integer) int32
StrVal string string
Type Type Type

项目

+protobuf.options.(gogoproto.goproto_stringer)=false +kubebuilder:validation:Type=object

interface{}

KeyToPath

属性

名称 类型 Go类型 必填 默认值 描述 示例
key string string key is the key to project.
mode int32 (formatted integer) int32 mode is Optional: mode bits used to set permissions on this file.Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.If not specified, the volume defaultMode will be used.This might be in conflict with other options that affect the filemode, like fsGroup, and the result can be other mode bits set.+optional
path string string path is the relative path of the file to map the key to.May not be an absolute path.May not contain the path element '..'.May not start with the string '..'.

标签选择器

标签选择器是对一组资源的标签查询。matchLabels和matchExpressions的结果会进行逻辑与运算。空标签选择器会匹配所有对象。而null标签选择器不会匹配任何对象。 +structType=atomic

属性

名称 类型 Go类型 必填 默认值 描述 示例
matchExpressions []LabelSelectorRequirement []*LabelSelectorRequirement matchExpressions is a list of label selector requirements. The requirements are ANDed.+optional+listType=atomic
matchLabels map of string map[string]string matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabelsmap is equivalent to an element of matchExpressions, whose key field is "key", theoperator is "In", and the values array contains only "value". The requirements are ANDed.+optional

LabelSelectorOperator

名称 类型 Go类型 默认值 描述 示例
LabelSelectorOperator string string

LabelSelectorRequirement

标签选择器要求是一个包含值、键以及将键与值关联起来的运算符的选择器。

属性

名称 类型 Go类型 必填 默认值 描述 示例
key string string key is the label key that the selector applies to.
operator LabelSelectorOperator LabelSelectorOperator
values []string []string values is an array of string values. If the operator is In or NotIn,the values array must be non-empty. If the operator is Exists or DoesNotExist,the values array must be empty. This array is replaced during a strategicmerge patch.+optional+listType=atomic

生命周期

生命周期描述了管理系统应对容器生命周期事件所采取的操作。对于PostStart和PreStop生命周期钩子,容器管理会阻塞直到操作完成,除非容器进程失败,此时钩子会被中止。

属性

名称 类型 Go类型 必填 默认值 描述 示例
postStart LifecycleHandler LifecycleHandler
preStop LifecycleHandler LifecycleHandler

生命周期处理器

LifecycleHandler 定义了在生命周期钩子中应采取的特定操作。除了 TCPSocket 之外,必须且只能指定其中一个字段。

属性

名称 类型 Go类型 必填 默认值 描述 示例
exec ExecAction ExecAction
httpGet HTTPGetAction HTTPGetAction
sleep SleepAction SleepAction
tcpSocket TCPSocketAction TCPSocketAction

生命周期钩子

属性

名称 类型 Go类型 必填 默认值 描述 示例
arguments Arguments Arguments
expression string string Expression is a condition expression for when a node will be retried. If it evaluates to false, the node will notbe retried and the retry strategy will be ignored
template string string Template is the name of the template to execute by the hook
templateRef TemplateRef TemplateRef

生命周期钩子

LifecycleHooks

LocalObjectReference

不建议使用此类型的新用途,因为当嵌入API时难以描述其用法。 1. 无效的用法帮助。无法为个别用法添加具体帮助。在大多数嵌入式用法中,存在特定限制,例如"只能引用类型A和B"或"不识别UID"或"名称必须受限"。 这些限制在嵌入时无法很好地描述。 2. 不一致的验证。由于用法不同,验证规则也因用法而异,这使得用户难以预测会发生什么。 3. 我们无法轻易更改它。由于此类型嵌入在许多位置,对此类型的更新将影响众多模式。不要让新的API嵌入它们无法控制的未充分指定的API类型。

与其使用此类型,不如创建一个本地提供和使用的类型,该类型应专注于您的引用。 例如,准入注册的ServiceReferences:https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 。 +structType=atomic

属性

名称 类型 Go类型 必填 默认值 描述 示例
name string string Name of the referent.This field is effectively required, but due to backwards compatibility isallowed to be empty. Instances of this type with an empty value here arealmost certainly wrong.More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names+optional+default=""+kubebuilder:default=""TODO: Drop kubebuilder:default when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.

ManagedFields条目

ManagedFieldsEntry 是一个工作流ID、一个字段集以及该字段集所应用的资源的组版本。

属性

名称 类型 Go类型 必填 默认值 描述 示例
apiVersion string string APIVersion defines the version of this resource that this field setapplies to. The format is "group/version" just like the top-levelAPIVersion field. It is necessary to track the version of a fieldset because it cannot be automatically converted.
fieldsType string string FieldsType is the discriminator for the different fields format and version.There is currently only one possible value: "FieldsV1"
fieldsV1 FieldsV1 FieldsV1
manager string string Manager is an identifier of the workflow managing these fields.
operation ManagedFieldsOperationType ManagedFieldsOperationType
subresource string string Subresource is the name of the subresource used to update that object, orempty string if the object was updated through the main resource. Thevalue of this field is used to distinguish between managers, even if theyshare the same name. For example, a status update will be distinct from aregular update using the same manager name.Note that the APIVersion field is not related to the Subresource field andit always corresponds to the version of the main resource.
time string string Time is the timestamp of when the ManagedFields entry was added. Thetimestamp will also be updated if a field is added, the managerchanges any of the owned fields value or removes a field. Thetimestamp does not update when a field is removed from the entrybecause another manager took it over.+optional

ManagedFields操作类型

名称 类型 Go类型 默认值 描述 示例
ManagedFieldsOperationType string string

从清单生成

属性

名称 类型 Go类型 必填 默认值 描述 示例
artifact Artifact Artifact

记忆化

记忆化功能可缓存模板的输出结果

属性

名称 类型 Go类型 必填 默认值 描述 示例
cache Cache Cache
key string string Key is the key to use as the caching key
maxAge string string MaxAge is the maximum age (e.g. "180s", "24h") of an entry that is still considered valid. If an entry is olderthan the MaxAge, it will be ignored.

元数据

Pod元数据

属性

名称 类型 Go类型 必填 默认值 描述 示例
annotations map of string map[string]string
labels map of string map[string]string

指标标签

MetricLabel是Prometheus指标的单个标签

属性

名称 类型 Go类型 必填 默认值 描述 示例
key string string
value string string

指标

指标是从工作流/模板发出的一系列指标

属性

名称 类型 Go类型 必填 默认值 描述 示例
prometheus []Prometheus []*Prometheus Prometheus is a list of prometheus metrics to be emitted

挂载传播模式

+枚举

名称 类型 Go语言类型 默认值 描述 示例
挂载传播模式 string string +enum

互斥锁

Mutex 持有互斥锁配置

属性

名称 类型 Go类型 必填 默认值 描述 示例
name string string name of the mutex
namespace string string "[namespace of workflow]"

NFSVolumeSource

NFS卷不支持所有权管理或SELinux重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
path string string path that is exported by the NFS server.More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
readOnly boolean bool readOnly here will force the NFS export to be mounted with read-only permissions.Defaults to false.More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs+optional
server string string server is the hostname or IP address of the NFS server.More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs

节点亲和性(NodeAffinity)

属性

名称 类型 Go类型 必填 默认值 描述 示例
preferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm []*PreferredSchedulingTerm The scheduler will prefer to schedule pods to nodes that satisfythe affinity expressions specified by this field, but it may choosea node that violates one or more of the expressions. The node that ismost preferred is the one with the greatest sum of weights, i.e.for each node that meets all of the scheduling requirements (resourcerequest, requiredDuringScheduling affinity expressions, etc.),compute a sum by iterating through the elements of this field and adding"weight" to the sum if the node matches the corresponding matchExpressions; thenode(s) with the highest sum are the most preferred.+optional+listType=atomic
requiredDuringSchedulingIgnoredDuringExecution NodeSelector NodeSelector

节点阶段

名称 类型 Go语言类型 默认值 描述 示例
节点阶段 字符串 字符串

节点结果

属性

名称 类型 Go类型 必填 默认值 描述 示例
message string string
outputs Outputs Outputs
phase NodePhase NodePhase
progress Progress Progress

节点选择器

节点选择器表示对一组节点执行一个或多个标签查询结果的并集;也就是说,它代表了由节点选择器条件所表示的选择器的逻辑或关系。 +structType=atomic

属性

名称 类型 Go类型 必填 默认值 描述 示例
nodeSelectorTerms []NodeSelectorTerm []*NodeSelectorTerm Required. A list of node selector terms. The terms are ORed.+listType=atomic

NodeSelectorOperator

节点选择器运算符是可以在节点选择器要求中使用的一组运算符。 +enum

名称 类型 Go语言类型 默认值 描述 示例
NodeSelectorOperator string string 节点选择器运算符是可以在节点选择器要求中使用的一组运算符。+enum

NodeSelectorRequirement

节点选择器要求是一个包含值、键以及将键与值关联起来的运算符的选择器。

属性

名称 类型 Go类型 必填 默认值 描述 示例
key string string The label key that the selector applies to.
operator NodeSelectorOperator NodeSelectorOperator
values []string []string An array of string values. If the operator is In or NotIn,the values array must be non-empty. If the operator is Exists or DoesNotExist,the values array must be empty. If the operator is Gt or Lt, the valuesarray must have a single element, which will be interpreted as an integer.This array is replaced during a strategic merge patch.+optional+listType=atomic

节点选择器条件

空或空的节点选择器条件不匹配任何对象。它们的要求是逻辑与关系。 TopologySelectorTerm 类型实现了 NodeSelectorTerm 的一个子集。 +structType=atomic

属性

名称 类型 Go类型 必填 默认值 描述 示例
matchExpressions []NodeSelectorRequirement []*NodeSelectorRequirement A list of node selector requirements by node's labels.+optional+listType=atomic
matchFields []NodeSelectorRequirement []*NodeSelectorRequirement A list of node selector requirements by node's fields.+optional+listType=atomic

NoneStrategy

NoneStrategy表示跳过tar处理过程,直接将文件或目录树作为独立文件上传。请注意,如果工件是一个目录,工件驱动必须支持正确保存/加载目录的能力。

interface{}

OAuth2认证

OAuth2Auth 包含通过 OAuth2 令牌进行客户端认证的所有信息

属性

名称 类型 Go类型 必填 默认值 描述 示例
clientIDSecret SecretKeySelector SecretKeySelector
clientSecretSecret SecretKeySelector SecretKeySelector
endpointParams []OAuth2EndpointParam []*OAuth2EndpointParam
scopes []string []string
tokenURLSecret SecretKeySelector SecretKeySelector

OAuth2端点参数

EndpointParam 用于请求在oauth请求中应发送的可选字段

属性

名称 类型 Go类型 必填 默认值 描述 示例
key string string Name is the header name
value string string Value is the literal value to use for the header

OSSArtifact

OSSArtifact 是阿里云 OSS 存储对象的位置

属性

名称 类型 Go类型 必填 默认值 描述 示例
accessKeySecret SecretKeySelector SecretKeySelector
bucket string string Bucket is the name of the bucket
createBucketIfNotPresent boolean bool CreateBucketIfNotPresent tells the driver to attempt to create the OSS bucket for output artifacts, if it doesn't exist
endpoint string string Endpoint is the hostname of the bucket endpoint
key string string Key is the path in the bucket where the artifact resides
lifecycleRule OSSLifecycleRule OSSLifecycleRule
secretKeySecret SecretKeySelector SecretKeySelector
securityToken string string SecurityToken is the user's temporary security token. For more details, check out: https://www.alibabacloud.com/help/doc-detail/100624.htm
useSDKCreds boolean bool UseSDKCreds tells the driver to figure out credentials based on sdk defaults.

OSS生命周期规则

OSSLifecycleRule 规定了如何管理存储桶的生命周期

属性

名称 类型 Go类型 必填 默认值 描述 示例
markDeletionAfterDays int32 (formatted integer) int32 MarkDeletionAfterDays is the number of days before we delete objects in the bucket
markInfrequentAccessAfterDays int32 (formatted integer) int32 MarkInfrequentAccessAfterDays is the number of days before we convert the objects in the bucket to Infrequent Access (IA) storage type

ObjectFieldSelector

+structType=atomic

属性

名称 类型 Go类型 必填 默认值 描述 示例
apiVersion string string Version of the schema the FieldPath is written in terms of, defaults to "v1".+optional
fieldPath string string Path of the field to select in the specified API version.

ObjectMeta

属性

名称 类型 Go类型 必填 默认值 描述 示例
name string string
namespace string string
uid string string

输出

输出包含步骤中的参数、工件和结果

属性

名称 类型 Go类型 必填 默认值 描述 示例
artifacts Artifacts Artifacts
exitCode string string ExitCode holds the exit code of a script template
parameters []Parameter []*Parameter Parameters holds the list of output parameters produced by a step+patchStrategy=merge+patchMergeKey=name
result string string Result holds the result (stdout) of a script template

OwnerReference

OwnerReference包含足够的信息用于识别所属对象。所属对象必须与依赖项位于同一命名空间内,或者是集群范围的,因此没有命名空间字段。 +structType=atomic

属性

名称 类型 Go类型 必填 默认值 描述 示例
apiVersion string string API version of the referent.
blockOwnerDeletion boolean bool If true, AND if the owner has the "foregroundDeletion" finalizer, thenthe owner cannot be deleted from the key-value store until thisreference is removed.See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletionfor how the garbage collector interacts with this field and enforces the foreground deletion.Defaults to false.To set this field, a user needs "delete" permission of the owner,otherwise 422 (Unprocessable Entity) will be returned.+optional
controller boolean bool If true, this reference points to the managing controller.+optional
kind string string Kind of the referent.More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
name string string Name of the referent.More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
uid UID UID

并行步骤

+kubebuilder:validation:Type=array

interface{}

参数

参数表示传递给服务模板的字符串参数,可包含一个可选的默认值

属性

名称 类型 Go类型 必填 默认值 描述 示例
default AnyString AnyString
description AnyString AnyString
enum []AnyString []AnyString Enum holds a list of string values to choose from, for the actual value of the parameter
globalName string string GlobalName exports an output parameter to the global scope, making it available as'{{workflow.outputs.parameters.XXXX}} and in workflow.status.outputs.parameters
name string string Name is the parameter name
value AnyString AnyString
valueFrom ValueFrom ValueFrom

PersistentVolume访问模式

+枚举

名称 类型 Go语言类型 默认值 描述 示例
PersistentVolumeAccessMode string string +enum

PersistentVolumeClaimSpec 规范

PersistentVolumeClaimSpec 描述了存储设备的通用属性,并允许提供特定于供应商属性的来源

属性

名称 类型 Go语言类型 是否必需 默认值 描述 示例
accessModes []PersistentVolumeAccessMode []PersistentVolumeAccessMode accessModes contains the desired access modes the volume should have.More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1+optional+listType=atomic
dataSource TypedLocalObjectReference TypedLocalObjectReference
dataSourceRef TypedObjectReference TypedObjectReference
resources VolumeResourceRequirements VolumeResourceRequirements
selector LabelSelector LabelSelector
storageClassName string string storageClassName is the name of the StorageClass required by the claim.More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1+optional
volumeAttributesClassName string string volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim.If specified, the CSI driver will create or update the volume with the attributes definedin the corresponding VolumeAttributesClass. This has a different purpose than storageClassName,it can be changed after the claim is created. An empty string value means that no VolumeAttributesClasswill be applied to the claim but it's not allowed to reset this field to empty string once it is set.If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClasswill be set by the persistentvolume controller if it exists.If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will beset to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resourceexists.More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/(Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default).+featureGate=VolumeAttributesClass+optional
volumeMode PersistentVolumeMode PersistentVolumeMode
volumeName string string volumeName is the binding reference to the PersistentVolume backing this claim.+optional

持久卷声明模板

PersistentVolumeClaimTemplate 用于生成 PersistentVolumeClaim 对象,作为 EphemeralVolumeSource 的一部分。

属性

名称 类型 Go语言类型 是否必需 默认值 描述 示例
annotations map of string map[string]string Annotations is an unstructured key value map stored with a resource that may beset by external tools to store and retrieve arbitrary metadata. They are notqueryable and should be preserved when modifying objects.More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations+optional
creationTimestamp string string CreationTimestamp is a timestamp representing the server time when this object wascreated. It is not guaranteed to be set in happens-before order across separate operations.Clients may not set this value. It is represented in RFC3339 form and is in UTC.Populated by the system.Read-only.Null for lists.More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata+optional
deletionGracePeriodSeconds int64 (formatted integer) int64 Number of seconds allowed for this object to gracefully terminate beforeit will be removed from the system. Only set when deletionTimestamp is also set.May only be shortened.Read-only.+optional
deletionTimestamp string string DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. Thisfield is set by the server when a graceful deletion is requested by the user, and is notdirectly settable by a client. The resource is expected to be deleted (no longer visiblefrom resource lists, and not reachable by name) after the time in this field, once thefinalizers list is empty. As long as the finalizers list contains items, deletion is blocked.Once the deletionTimestamp is set, this value may not be unset or be set further into thefuture, although it may be shortened or the resource may be deleted prior to this time.For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will reactby sending a graceful termination signal to the containers in the pod. After that 30 seconds,the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,remove the pod from the API. In the presence of network partitions, this object may stillexist after this timestamp, until an administrator or automated process can determine theresource is fully terminated.If not set, graceful deletion of the object has not been requested.Populated by the system when a graceful deletion is requested.Read-only.More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata+optional
finalizers []string []string Must be empty before the object is deleted from the registry. Each entryis an identifier for the responsible component that will remove the entryfrom the list. If the deletionTimestamp of the object is non-nil, entriesin this list can only be removed.Finalizers may be processed and removed in any order. Order is NOT enforcedbecause it introduces significant risk of stuck finalizers.finalizers is a shared field, any actor with permission can reorder it.If the finalizer list is processed in order, then this can lead to a situationin which the component responsible for the first finalizer in the list iswaiting for a signal (field value, external system, or other) produced by acomponent responsible for a finalizer later in the list, resulting in a deadlock.Without enforced ordering finalizers are free to order amongst themselves andare not vulnerable to ordering changes in the list.+optional+patchStrategy=merge+listType=set
generateName string string GenerateName is an optional prefix, used by the server, to generate a uniquename ONLY IF the Name field has not been provided.If this field is used, the name returned to the client will be differentthan the name passed. This value will also be combined with a unique suffix.The provided value has the same validation rules as the Name field,and may be truncated by the length of the suffix required to make the valueunique on the server.If this field is specified and the generated name exists, the server will return a 409.Applied only if Name is not specified.More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency+optional
generation int64 (formatted integer) int64 A sequence number representing a specific generation of the desired state.Populated by the system. Read-only.+optional
labels map of string map[string]string Map of string keys and values that can be used to organize and categorize(scope and select) objects. May match selectors of replication controllersand services.More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels+optional
managedFields []ManagedFieldsEntry []*ManagedFieldsEntry ManagedFields maps workflow-id and version to the set of fieldsthat are managed by that workflow. This is mostly for internalhousekeeping, and users typically shouldn't need to set orunderstand this field. A workflow can be the user's name, acontroller's name, or the name of a specific apply path like"ci-cd". The set of fields is always in the version that theworkflow used when modifying the object.+optional+listType=atomic
name string string Name must be unique within a namespace. Is required when creating resources, althoughsome resources may allow a client to request the generation of an appropriate nameautomatically. Name is primarily intended for creation idempotence and configurationdefinition.Cannot be updated.More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names+optional
namespace string string Namespace defines the space within which each name must be unique. An empty namespace isequivalent to the "default" namespace, but "default" is the canonical representation.Not all objects are required to be scoped to a namespace - the value of this field forthose objects will be empty.Must be a DNS_LABEL.Cannot be updated.More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces+optional
ownerReferences []OwnerReference []*OwnerReference List of objects depended by this object. If ALL objects in the list havebeen deleted, this object will be garbage collected. If this object is managed by a controller,then an entry in this list will point to this controller, with the controller field set to true.There cannot be more than one managing controller.+optional+patchMergeKey=uid+patchStrategy=merge+listType=map+listMapKey=uid
resourceVersion string string An opaque value that represents the internal version of this object that canbe used by clients to determine when objects have changed. May be used for optimisticconcurrency, change detection, and the watch operation on a resource or set of resources.Clients must treat these values as opaque and passed unmodified back to the server.They may only be valid for a particular resource or set of resources.Populated by the system.Read-only.Value must be treated as opaque by clients and .More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency+optional
selfLink string string Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.+optional
spec PersistentVolumeClaimSpec PersistentVolumeClaimSpec
uid UID UID

PersistentVolumeClaimVolumeSource

该卷会查找绑定的PV并将该卷挂载到Pod上。PersistentVolumeClaimVolumeSource本质上是一个对其他类型卷(由系统所有)的封装。

属性

名称 类型 Go语言类型 是否必需 默认值 描述 示例
claimName string string claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume.More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
readOnly boolean bool readOnly Will force the ReadOnly setting in VolumeMounts.Default false.+optional

持久卷模式

+枚举

名称 类型 Go语言类型 默认值 描述 示例
PersistentVolumeMode string string +enum

PhotonPersistentDiskVolumeSource

属性

名称 类型 Go类型 必填 默认值 描述 示例
fsType string string fsType is the filesystem type to mount.Must be a filesystem type supported by the host operating system.Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
pdID string string pdID is the ID that identifies Photon Controller persistent disk

插件

插件是一个仅包含一个键的对象

interface{}

Pod亲和性

属性

名称 类型 Go类型 必填 默认值 描述 示例
preferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm []*WeightedPodAffinityTerm The scheduler will prefer to schedule pods to nodes that satisfythe affinity expressions specified by this field, but it may choosea node that violates one or more of the expressions. The node that ismost preferred is the one with the greatest sum of weights, i.e.for each node that meets all of the scheduling requirements (resourcerequest, requiredDuringScheduling affinity expressions, etc.),compute a sum by iterating through the elements of this field and adding"weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; thenode(s) with the highest sum are the most preferred.+optional+listType=atomic
requiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm []*PodAffinityTerm If the affinity requirements specified by this field are not met atscheduling time, the pod will not be scheduled onto the node.If the affinity requirements specified by this field cease to be metat some point during pod execution (e.g. due to a pod label update), thesystem may or may not try to eventually evict the pod from its node.When there are multiple elements, the lists of nodes corresponding to eachpodAffinityTerm are intersected, i.e. all terms must be satisfied.+optional+listType=atomic

Pod亲和性条件

定义了一组Pod(即与给定命名空间下labelSelector匹配的Pod),当前Pod应与这组Pod位于同一位置(亲和性)或不应位于同一位置(反亲和性)。其中"位于同一位置"的定义是:运行在具有特定拓扑键(topologykey)标签的节点上,且该标签值与运行该组Pod中任一Pod的节点标签值相匹配。

属性

名称 类型 Go类型 必填 默认值 描述 示例
labelSelector LabelSelector LabelSelector
matchLabelKeys []string []string MatchLabelKeys is a set of pod label keys to select which pods willbe taken into consideration. The keys are used to lookup values from theincoming pod labels, those key-value labels are merged with labelSelector as key in (value)to select the group of existing pods which pods will be taken into considerationfor the incoming pod's pod (anti) affinity. Keys that don't exist in the incomingpod labels will be ignored. The default value is empty.The same key is forbidden to exist in both matchLabelKeys and labelSelector.Also, matchLabelKeys cannot be set when labelSelector isn't set.This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).+listType=atomic+optional
mismatchLabelKeys []string []string MismatchLabelKeys is a set of pod label keys to select which pods willbe taken into consideration. The keys are used to lookup values from theincoming pod labels, those key-value labels are merged with labelSelector as key notin (value)to select the group of existing pods which pods will be taken into considerationfor the incoming pod's pod (anti) affinity. Keys that don't exist in the incomingpod labels will be ignored. The default value is empty.The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.Also, mismatchLabelKeys cannot be set when labelSelector isn't set.This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).+listType=atomic+optional
namespaceSelector LabelSelector LabelSelector
namespaces []string []string namespaces specifies a static list of namespace names that the term applies to.The term is applied to the union of the namespaces listed in this fieldand the ones selected by namespaceSelector.null or empty namespaces list and null namespaceSelector means "this pod's namespace".+optional+listType=atomic
topologyKey string string This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matchingthe labelSelector in the specified namespaces, where co-located is defined as running on a nodewhose value of the label with key topologyKey matches that of any node on which any of theselected pods is running.Empty topologyKey is not allowed.

Pod反亲和性

属性

名称 类型 Go类型 必填 默认值 描述 示例
preferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm []*WeightedPodAffinityTerm The scheduler will prefer to schedule pods to nodes that satisfythe anti-affinity expressions specified by this field, but it may choosea node that violates one or more of the expressions. The node that ismost preferred is the one with the greatest sum of weights, i.e.for each node that meets all of the scheduling requirements (resourcerequest, requiredDuringScheduling anti-affinity expressions, etc.),compute a sum by iterating through the elements of this field and adding"weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; thenode(s) with the highest sum are the most preferred.+optional+listType=atomic
requiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm []*PodAffinityTerm If the anti-affinity requirements specified by this field are not met atscheduling time, the pod will not be scheduled onto the node.If the anti-affinity requirements specified by this field cease to be metat some point during pod execution (e.g. due to a pod label update), thesystem may or may not try to eventually evict the pod from its node.When there are multiple elements, the lists of nodes corresponding to eachpodAffinityTerm are intersected, i.e. all terms must be satisfied.+optional+listType=atomic

PodFSGroup变更策略

PodFSGroupChangePolicy 定义了在卷挂载时应用 fsGroup 到卷的策略 +enum

名称 类型 Go语言类型 默认值 描述 示例
PodFSGroupChangePolicy string string PodFSGroupChangePolicy 定义了在挂载卷时应用fsGroup到卷的策略。+枚举类型

PodSELinux变更策略

名称 类型 Go语言类型 默认值 描述 示例
PodSELinuxChangePolicy string string

Pod安全上下文

部分字段也存在于container.securityContext中。container.securityContext的字段值优先级高于PodSecurityContext的字段值。

属性

名称 类型 Go类型 必填 默认值 描述 示例
appArmorProfile AppArmorProfile AppArmorProfile
fsGroup int64 (formatted integer) int64 A special supplemental group that applies to all containers in a pod.Some volume types allow the Kubelet to change the ownership of that volumeto be owned by the pod:1. The owning GID will be the FSGroup2. The setgid bit is set (new files created in the volume will be owned by FSGroup)3. The permission bits are OR'd with rw-rw----If unset, the Kubelet will not modify the ownership and permissions of any volume.Note that this field cannot be set when spec.os.name is windows.+optional
fsGroupChangePolicy PodFSGroupChangePolicy PodFSGroupChangePolicy
runAsGroup int64 (formatted integer) int64 The GID to run the entrypoint of the container process.Uses runtime default if unset.May also be set in SecurityContext. If set in both SecurityContext andPodSecurityContext, the value specified in SecurityContext takes precedencefor that container.Note that this field cannot be set when spec.os.name is windows.+optional
runAsNonRoot boolean bool Indicates that the container must run as a non-root user.If true, the Kubelet will validate the image at runtime to ensure that itdoes not run as UID 0 (root) and fail to start the container if it does.If unset or false, no such validation will be performed.May also be set in SecurityContext. If set in both SecurityContext andPodSecurityContext, the value specified in SecurityContext takes precedence.+optional
runAsUser int64 (formatted integer) int64 The UID to run the entrypoint of the container process.Defaults to user specified in image metadata if unspecified.May also be set in SecurityContext. If set in both SecurityContext andPodSecurityContext, the value specified in SecurityContext takes precedencefor that container.Note that this field cannot be set when spec.os.name is windows.+optional
seLinuxChangePolicy PodSELinuxChangePolicy PodSELinuxChangePolicy
seLinuxOptions SELinuxOptions SELinuxOptions
seccompProfile SeccompProfile SeccompProfile
supplementalGroups []int64 (formatted integer) []int64 A list of groups applied to the first process run in each container, inaddition to the container's primary GID and fsGroup (if specified). Ifthe SupplementalGroupsPolicy feature is enabled, thesupplementalGroupsPolicy field determines whether these are in additionto or instead of any group memberships defined in the container image.If unspecified, no additional groups are added, though group membershipsdefined in the container image may still be used, depending on thesupplementalGroupsPolicy field.Note that this field cannot be set when spec.os.name is windows.+optional+listType=atomic
supplementalGroupsPolicy SupplementalGroupsPolicy SupplementalGroupsPolicy
sysctls []Sysctl []*Sysctl Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupportedsysctls (by the container runtime) might fail to launch.Note that this field cannot be set when spec.os.name is windows.+optional+listType=atomic
windowsOptions WindowsSecurityContextOptions WindowsSecurityContextOptions

PortworxVolumeSource

属性

名称 类型 Go类型 必填 默认值 描述 示例
fsType string string fSType represents the filesystem type to mountMust be a filesystem type supported by the host operating system.Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
readOnly boolean bool readOnly defaults to false (read/write). ReadOnly here will forcethe ReadOnly setting in VolumeMounts.+optional
volumeID string string volumeID uniquely identifies a Portworx volume

PreferredSchedulingTerm

一个空的偏好调度条件会隐式匹配所有对象,权重为0(即无操作)。一个空的偏好调度条件不匹配任何对象(同样是无操作)。

属性

名称 类型 Go类型 必填 默认值 描述 示例
preference NodeSelectorTerm NodeSelectorTerm
weight int32 (formatted integer) int32 Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.

探针

Probe 描述了对容器执行的健康检查,用于确定容器是否存活或准备好接收流量。

属性

名称 类型 Go类型 必填 默认值 描述 示例
exec ExecAction ExecAction
failureThreshold int32 (formatted integer) int32 Minimum consecutive failures for the probe to be considered failed after having succeeded.Defaults to 3. Minimum value is 1.+optional
grpc GRPCAction GRPCAction
httpGet HTTPGetAction HTTPGetAction
initialDelaySeconds int32 (formatted integer) int32 Number of seconds after the container has started before liveness probes are initiated.More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes+optional
periodSeconds int32 (formatted integer) int32 How often (in seconds) to perform the probe.Default to 10 seconds. Minimum value is 1.+optional
successThreshold int32 (formatted integer) int32 Minimum consecutive successes for the probe to be considered successful after having failed.Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.+optional
tcpSocket TCPSocketAction TCPSocketAction
terminationGracePeriodSeconds int64 (formatted integer) int64 Optional duration in seconds the pod needs to terminate gracefully upon probe failure.The grace period is the duration in seconds after the processes running in the pod are senta termination signal and the time when the processes are forcibly halted with a kill signal.Set this value longer than the expected cleanup time for your process.If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, thisvalue overrides the value provided by the pod spec.Value must be non-negative integer. The value zero indicates stop immediately viathe kill signal (no opportunity to shut down).This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate.Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.+optional
timeoutSeconds int32 (formatted integer) int32 Number of seconds after which the probe times out.Defaults to 1 second. Minimum value is 1.More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes+optional

ProcMountType

+枚举

名称 类型 Go语言类型 默认值 描述 示例
ProcMountType string string +enum

进度

名称 类型 Go类型 默认值 描述 示例
进度 string string

ProjectedVolumeSource

表示一个投影卷源

属性

名称 类型 Go类型 必填 默认值 描述 示例
defaultMode int32 (formatted integer) int32 defaultMode are the mode bits used to set permissions on created files by default.Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.Directories within the path are not affected by this setting.This might be in conflict with other options that affect the filemode, like fsGroup, and the result can be other mode bits set.+optional
sources []VolumeProjection []*VolumeProjection sources is the list of volume projections. Each entry in this listhandles one source.+optional+listType=atomic

Prometheus

Prometheus 是一个要发送的 prometheus 指标

属性

名称 类型 Go类型 必填 默认值 描述 示例
counter Counter Counter
gauge Gauge Gauge
help string string Help is a string that describes the metric
histogram Histogram Histogram
labels []MetricLabel []*MetricLabel Labels is a list of metric labels
name string string Name is the name of the metric
when string string When is a conditional statement that decides when to emit the metric

协议

+枚举

名称 类型 Go类型 默认值 描述 示例
协议 string string +enum

拉取策略(PullPolicy)

PullPolicy 描述了拉取容器镜像的策略条件 +enum

名称 类型 Go类型 默认值 描述 示例
PullPolicy string string PullPolicy描述了一个关于何时/如何拉取容器镜像的策略+枚举

数量

序列化格式为:

<quantity>        ::= <signedNumber><suffix>

(Note that <suffix> may be empty, from the "" case in <decimalSI>.)

<digit>           ::= 0 | 1 | ... | 9
<digits>          ::= <digit> | <digit><digits>
<number>          ::= <digits> | <digits>.<digits> | <digits>. | .<digits>
<sign>            ::= "+" | "-"
<signedNumber>    ::= <number> | <sign><number>
<suffix>          ::= <binarySI> | <decimalExponent> | <decimalSI>
<binarySI>        ::= Ki | Mi | Gi | Ti | Pi | Ei

(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)

<decimalSI>       ::= m | "" | k | M | G | T | P | E

(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)

<decimalExponent> ::= "e" <signedNumber> | "E" <signedNumber>

无论使用三种指数形式中的哪一种,任何数值的大小都不能超过2^63-1,也不能超过3位小数。更大或更精确的数字将被限制或向上取整。(例如:0.1m将被向上取整为1m。)如果将来我们需要更大或更小的数值范围,可能会对此进行扩展。

当从字符串解析Quantity时,它会记住其拥有的后缀类型,并在序列化时再次使用相同的类型。

在序列化之前,Quantity将被转换为"规范形式"。 这意味着指数/后缀会相应调高或调低(同时尾数也会相应增加或减少),以确保:

不会丢失精度 不会输出小数位 指数(或后缀)尽可能大。

除非数字为负数,否则符号将被省略。

示例:

1.5将被序列化为"1500m" 1.5Gi将被序列化为"1536Mi"

请注意,该数量绝不会在内部以浮点数形式表示。这正是本次练习的核心目的。

非规范值只要格式正确仍可解析,但会以规范形式重新输出。(因此请始终使用规范形式,或不要进行差异比较。)

这种格式旨在让使用者难以直接利用这些数值,除非编写特定的处理代码,目的是促使实现者也采用定点数实现方案。

+protobuf=true +protobuf.embed=string +protobuf.options.marshal=false +protobuf.options.(gogoproto.goproto_stringer)=false +k8s:deepcopy-gen=true +k8s:openapi-gen=true

interface{}

QuobyteVolumeSource

Quobyte卷不支持所有权管理或SELinux重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
group string string group to map volume access toDefault is no group+optional
readOnly boolean bool readOnly here will force the Quobyte volume to be mounted with read-only permissions.Defaults to false.+optional
registry string string registry represents a single or multiple Quobyte Registry servicesspecified as a string as host:port pair (multiple entries are separated with commas)which acts as the central registry for volumes
tenant string string tenant owning the given Quobyte volume in the BackendUsed with dynamically provisioned Quobyte volumes, value is set by the plugin+optional
user string string user to map volume access toDefaults to serivceaccount user+optional
volume string string volume is a string that references an already created Quobyte volume by name.

RBD卷源

RBD卷支持所有权管理和SELinux重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
fsType string string fsType is the filesystem type of the volume that you want to mount.Tip: Ensure that the filesystem type is supported by the host operating system.Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.More info: https://kubernetes.io/docs/concepts/storage/volumes#rbdTODO: how do we prevent errors in the filesystem from compromising the machine+optional
image string string image is the rados image name.More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
keyring string string keyring is the path to key ring for RBDUser.Default is /etc/ceph/keyring.More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it+optional+default="/etc/ceph/keyring"
monitors []string []string monitors is a collection of Ceph monitors.More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it+listType=atomic
pool string string pool is the rados pool name.Default is rbd.More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it+optional+default="rbd"
readOnly boolean bool readOnly here will force the ReadOnly setting in VolumeMounts.Defaults to false.More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it+optional
secretRef LocalObjectReference LocalObjectReference
user string string user is the rados user name.Default is admin.More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it+optional+default="admin"

原始工件

RawArtifact 允许将原始字符串内容作为工件放置在容器中

属性

名称 类型 Go类型 必填 默认值 描述 示例
data string string Data is the string contents of the artifact

递归只读模式

名称 类型 Go类型 默认值 描述 示例
递归只读模式 string string

资源声明

属性

名称 类型 Go类型 必填 默认值 描述 示例
name string string Name must match the name of one entry in pod.spec.resourceClaims ofthe Pod where this field is used. It makes that resource availableinside a container.
request string string Request is the name chosen for a request in the referenced claim.If empty, everything from the claim is made available, otherwiseonly the result of this request.+optional

ResourceFieldSelector

ResourceFieldSelector 表示容器资源(CPU、内存)及其输出格式 +structType=atomic

属性

名称 类型 Go类型 必填 默认值 描述 示例
containerName string string Container name: required for volumes, optional for env vars+optional
divisor Quantity Quantity
resource string string Required: resource to select

资源列表

ResourceList

资源名称

名称 类型 Go类型 默认值 描述 示例
ResourceName string string

资源需求

属性

名称 类型 Go类型 必填 默认值 描述 示例
claims []ResourceClaim []*ResourceClaim Claims lists the names of resources, defined in spec.resourceClaims,that are used by this container.This is an alpha field and requires enabling theDynamicResourceAllocation feature gate.This field is immutable. It can only be set for containers.+listType=map+listMapKey=name+featureGate=DynamicResourceAllocation+optional
limits ResourceList ResourceList
requests ResourceList ResourceList

ResourceResizeRestartPolicy

名称 类型 Go类型 默认值 描述 示例
ResourceResizeRestartPolicy string string

资源模板

ResourceTemplate 是一种用于操作 Kubernetes 资源的模板子类型

属性

名称 类型 Go类型 必填 默认值 描述 示例
action string string Action is the action to perform to the resource.Must be one of: get, create, apply, delete, replace, patch
failureCondition string string FailureCondition is a label selector expression which describes the conditionsof the k8s resource in which the step was considered failed
flags []string []string Flags is a set of additional options passed to kubectl before submitting a resourceI.e. to disable resource validation:flags: ["--validate=false" # disable resource validation]
manifest string string Manifest contains the kubernetes manifest
manifestFrom ManifestFrom ManifestFrom
mergeStrategy string string MergeStrategy is the strategy used to merge a patch. It defaults to "strategic"Must be one of: strategic, merge, json
setOwnerReference boolean bool SetOwnerReference sets the reference to the workflow on the OwnerReference of generated resource.
successCondition string string SuccessCondition is a label selector expression which describes the conditionsof the k8s resource in which it is acceptable to proceed to the following step

重试亲和性

属性

名称 类型 Go类型 必填 默认值 描述 示例
nodeAntiAffinity RetryNodeAntiAffinity RetryNodeAntiAffinity

RetryNodeAntiAffinity重试节点反亲和性

为了防止在同一主机上运行步骤,它使用了"kubernetes.io/hostname"。

interface{}

重试策略

名称 类型 Go类型 默认值 描述 示例
重试策略 string string

重试策略

RetryStrategy 提供了关于如何重试工作流步骤的控制

属性

名称 类型 Go类型 必填 默认值 描述 示例
affinity RetryAffinity RetryAffinity
backoff Backoff Backoff
expression string string Expression is a condition expression for when a node will be retried. If it evaluates to false, the node will notbe retried and the retry strategy will be ignored
limit IntOrString IntOrString
retryPolicy RetryPolicy RetryPolicy

S3Artifact

S3Artifact 是一个 S3 存储对象的位置

属性

名称 类型 Go类型 必填 默认值 描述 示例
accessKeySecret SecretKeySelector SecretKeySelector
bucket string string Bucket is the name of the bucket
caSecret SecretKeySelector SecretKeySelector
createBucketIfNotPresent CreateS3BucketOptions CreateS3BucketOptions
encryptionOptions S3EncryptionOptions S3EncryptionOptions
endpoint string string Endpoint is the hostname of the bucket endpoint
insecure boolean bool Insecure will connect to the service with TLS
key string string Key is the key in the bucket where the artifact resides
region string string Region contains the optional bucket region
roleARN string string RoleARN is the Amazon Resource Name (ARN) of the role to assume.
secretKeySecret SecretKeySelector SecretKeySelector
sessionTokenSecret SecretKeySelector SecretKeySelector
useSDKCreds boolean bool UseSDKCreds tells the driver to figure out credentials based on sdk defaults.

S3加密选项

S3EncryptionOptions 用于确定 s3 操作期间的加密选项

属性

名称 类型 Go类型 必填 默认值 描述 示例
enableEncryption boolean bool EnableEncryption tells the driver to encrypt objects if set to true. If kmsKeyId and serverSideCustomerKeySecret are not set, SSE-S3 will be used
kmsEncryptionContext string string KmsEncryptionContext is a json blob that contains an encryption context. See https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context for more information
kmsKeyId string string KMSKeyId tells the driver to encrypt the object using the specified KMS Key.
serverSideCustomerKeySecret SecretKeySelector SecretKeySelector

SELinux选项

SELinuxOptions 是应用于容器的标签

属性

名称 类型 Go类型 必填 默认值 描述 示例
level string string Level is SELinux level label that applies to the container.+optional
role string string Role is a SELinux role label that applies to the container.+optional
type string string Type is a SELinux type label that applies to the container.+optional
user string string User is a SELinux user label that applies to the container.+optional

ScaleIO卷源

ScaleIOVolumeSource 表示一个持久的 ScaleIO 卷

属性

名称 类型 Go类型 必填 默认值 描述 示例
fsType string string fsType is the filesystem type to mount.Must be a filesystem type supported by the host operating system.Ex. "ext4", "xfs", "ntfs".Default is "xfs".+optional+default="xfs"
gateway string string gateway is the host address of the ScaleIO API Gateway.
protectionDomain string string protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.+optional
readOnly boolean bool readOnly Defaults to false (read/write). ReadOnly here will forcethe ReadOnly setting in VolumeMounts.+optional
secretRef LocalObjectReference LocalObjectReference
sslEnabled boolean bool sslEnabled Flag enable/disable SSL communication with Gateway, default false+optional
storageMode string string storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.Default is ThinProvisioned.+optional+default="ThinProvisioned"
storagePool string string storagePool is the ScaleIO Storage Pool associated with the protection domain.+optional
system string string system is the name of the storage system as configured in ScaleIO.
volumeName string string volumeName is the name of a volume already created in the ScaleIO systemthat is associated with this volume source.

脚本模板

ScriptTemplate是一种模板子类型,用于通过代码步骤启用脚本功能

属性

名称 类型 Go类型 必填 默认值 描述 示例
args []string []string Arguments to the entrypoint.The container image's CMD is used if this is not provided.Variable references $(VAR_NAME) are expanded using the container's environment. If a variablecannot be resolved, the reference in the input string will be unchanged. Double $$ are reducedto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" willproduce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardlessof whether the variable exists or not. Cannot be updated.More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell+optional+listType=atomic
command []string []string Entrypoint array. Not executed within a shell.The container image's ENTRYPOINT is used if this is not provided.Variable references $(VAR_NAME) are expanded using the container's environment. If a variablecannot be resolved, the reference in the input string will be unchanged. Double $$ are reducedto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" willproduce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardlessof whether the variable exists or not. Cannot be updated.More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell+optional+listType=atomic
env []EnvVar []*EnvVar List of environment variables to set in the container.Cannot be updated.+optional+patchMergeKey=name+patchStrategy=merge+listType=map+listMapKey=name
envFrom []EnvFromSource []*EnvFromSource List of sources to populate environment variables in the container.The keys defined within a source must be a C_IDENTIFIER. All invalid keyswill be reported as an event when the container is starting. When a key exists in multiplesources, the value associated with the last source will take precedence.Values defined by an Env with a duplicate key will take precedence.Cannot be updated.+optional+listType=atomic
image string string Container image name.More info: https://kubernetes.io/docs/concepts/containers/imagesThis field is optional to allow higher level config management to default or overridecontainer images in workload controllers like Deployments and StatefulSets.+optional
imagePullPolicy PullPolicy PullPolicy
lifecycle Lifecycle Lifecycle
livenessProbe Probe Probe
name string string Name of the container specified as a DNS_LABEL.Each container in a pod must have a unique name (DNS_LABEL).Cannot be updated.
ports []ContainerPort []*ContainerPort List of ports to expose from the container. Not specifying a port hereDOES NOT prevent that port from being exposed. Any port which islistening on the default "0.0.0.0" address inside a container will beaccessible from the network.Modifying this array with strategic merge patch may corrupt the data.For more information See https://github.com/kubernetes/kubernetes/issues/108255.Cannot be updated.+optional+patchMergeKey=containerPort+patchStrategy=merge+listType=map+listMapKey=containerPort+listMapKey=protocol
readinessProbe Probe Probe
resizePolicy []ContainerResizePolicy []*ContainerResizePolicy Resources resize policy for the container.+featureGate=InPlacePodVerticalScaling+optional+listType=atomic
resources ResourceRequirements ResourceRequirements
restartPolicy ContainerRestartPolicy ContainerRestartPolicy
securityContext SecurityContext SecurityContext
source string string Source contains the source code of the script to execute
startupProbe Probe Probe
stdin boolean bool Whether this container should allocate a buffer for stdin in the container runtime. If thisis not set, reads from stdin in the container will always result in EOF.Default is false.+optional
stdinOnce boolean bool Whether the container runtime should close the stdin channel after it has been opened bya single attach. When stdin is true the stdin stream will remain open across multiple attachsessions. If stdinOnce is set to true, stdin is opened on container start, is empty until thefirst client attaches to stdin, and then remains open and accepts data until the client disconnects,at which time stdin is closed and remains closed until the container is restarted. If thisflag is false, a container processes that reads from stdin will never receive an EOF.Default is false+optional
terminationMessagePath string string Optional: Path at which the file to which the container's termination messagewill be written is mounted into the container's filesystem.Message written is intended to be brief final status, such as an assertion failure message.Will be truncated by the node if greater than 4096 bytes. The total message length acrossall containers will be limited to 12kb.Defaults to /dev/termination-log.Cannot be updated.+optional
terminationMessagePolicy TerminationMessagePolicy TerminationMessagePolicy
tty boolean bool Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.Default is false.+optional
volumeDevices []VolumeDevice []*VolumeDevice volumeDevices is the list of block devices to be used by the container.+patchMergeKey=devicePath+patchStrategy=merge+listType=map+listMapKey=devicePath+optional
volumeMounts []VolumeMount []*VolumeMount Pod volumes to mount into the container's filesystem.Cannot be updated.+optional+patchMergeKey=mountPath+patchStrategy=merge+listType=map+listMapKey=mountPath
workingDir string string Container's working directory.If not specified, the container runtime's default will be used, whichmight be configured in the container image.Cannot be updated.+optional

SeccompProfile

只能设置一个配置文件来源。 +union

属性

名称 类型 Go类型 必填 默认值 描述 示例
localhostProfile string string localhostProfile indicates a profile defined in a file on the node should be used.The profile must be preconfigured on the node to work.Must be a descending path, relative to the kubelet's configured seccomp profile location.Must be set if type is "Localhost". Must NOT be set for any other type.+optional
type SeccompProfileType SeccompProfileType

SeccompProfileType

+枚举

名称 类型 Go类型 默认值 描述 示例
SeccompProfileType string string +enum

SecretEnvSource

目标Secret的Data字段内容将以键值对的形式作为环境变量呈现。

属性

名称 类型 Go类型 必填 默认值 描述 示例
name string string Name of the referent.This field is effectively required, but due to backwards compatibility isallowed to be empty. Instances of this type with an empty value here arealmost certainly wrong.More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names+optional+default=""+kubebuilder:default=""TODO: Drop kubebuilder:default when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
optional boolean bool Specify whether the Secret must be defined+optional

SecretKey选择器

+structType=atomic

属性

名称 类型 Go类型 必填 默认值 描述 示例
key string string The key of the secret to select from. Must be a valid secret key.
name string string Name of the referent.This field is effectively required, but due to backwards compatibility isallowed to be empty. Instances of this type with an empty value here arealmost certainly wrong.More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names+optional+default=""+kubebuilder:default=""TODO: Drop kubebuilder:default when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
optional boolean bool Specify whether the Secret or its key must be defined+optional

SecretProjection

目标Secret的Data字段内容将以文件形式呈现在投影卷中,使用Data字段中的键作为文件名。请注意,这与不带默认模式的secret卷来源完全相同。

属性

名称 类型 Go类型 必填 默认值 描述 示例
items []KeyToPath []*KeyToPath items if unspecified, each key-value pair in the Data field of the referencedSecret will be projected into the volume as a file whose name is thekey and content is the value. If specified, the listed keys will beprojected into the specified paths, and unlisted keys will not bepresent. If a key is specified which is not present in the Secret,the volume setup will error unless it is marked optional. Paths must berelative and may not contain the '..' path or start with '..'.+optional+listType=atomic
name string string Name of the referent.This field is effectively required, but due to backwards compatibility isallowed to be empty. Instances of this type with an empty value here arealmost certainly wrong.More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names+optional+default=""+kubebuilder:default=""TODO: Drop kubebuilder:default when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
optional boolean bool optional field specify whether the Secret or its key must be defined+optional

SecretVolumeSource

目标Secret的Data字段内容将以文件形式挂载到卷中,使用Data字段中的键作为文件名。 Secret卷支持所有权管理和SELinux重新标记。

属性

名称 类型 Go类型 必填 默认值 描述 示例
defaultMode int32 (formatted integer) int32 defaultMode is Optional: mode bits used to set permissions on created files by default.Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.YAML accepts both octal and decimal values, JSON requires decimal valuesfor mode bits. Defaults to 0644.Directories within the path are not affected by this setting.This might be in conflict with other options that affect the filemode, like fsGroup, and the result can be other mode bits set.+optional
items []KeyToPath []*KeyToPath items If unspecified, each key-value pair in the Data field of the referencedSecret will be projected into the volume as a file whose name is thekey and content is the value. If specified, the listed keys will beprojected into the specified paths, and unlisted keys will not bepresent. If a key is specified which is not present in the Secret,the volume setup will error unless it is marked optional. Paths must berelative and may not contain the '..' path or start with '..'.+optional+listType=atomic
optional boolean bool optional field specify whether the Secret or its keys must be defined+optional
secretName string string secretName is the name of the secret in the pod's namespace to use.More info: https://kubernetes.io/docs/concepts/storage/volumes#secret+optional

安全上下文

某些字段同时存在于SecurityContext和PodSecurityContext中。当两者都设置时,SecurityContext中的值具有优先权。

属性

名称 类型 Go类型 必填 默认值 描述 示例
allowPrivilegeEscalation boolean bool AllowPrivilegeEscalation controls whether a process can gain moreprivileges than its parent process. This bool directly controls ifthe no_new_privs flag will be set on the container process.AllowPrivilegeEscalation is true always when the container is:1) run as Privileged2) has CAP_SYS_ADMINNote that this field cannot be set when spec.os.name is windows.+optional
appArmorProfile AppArmorProfile AppArmorProfile
capabilities Capabilities Capabilities
privileged boolean bool Run container in privileged mode.Processes in privileged containers are essentially equivalent to root on the host.Defaults to false.Note that this field cannot be set when spec.os.name is windows.+optional
procMount ProcMountType ProcMountType
readOnlyRootFilesystem boolean bool Whether this container has a read-only root filesystem.Default is false.Note that this field cannot be set when spec.os.name is windows.+optional
runAsGroup int64 (formatted integer) int64 The GID to run the entrypoint of the container process.Uses runtime default if unset.May also be set in PodSecurityContext. If set in both SecurityContext andPodSecurityContext, the value specified in SecurityContext takes precedence.Note that this field cannot be set when spec.os.name is windows.+optional
runAsNonRoot boolean bool Indicates that the container must run as a non-root user.If true, the Kubelet will validate the image at runtime to ensure that itdoes not run as UID 0 (root) and fail to start the container if it does.If unset or false, no such validation will be performed.May also be set in PodSecurityContext. If set in both SecurityContext andPodSecurityContext, the value specified in SecurityContext takes precedence.+optional
runAsUser int64 (formatted integer) int64 The UID to run the entrypoint of the container process.Defaults to user specified in image metadata if unspecified.May also be set in PodSecurityContext. If set in both SecurityContext andPodSecurityContext, the value specified in SecurityContext takes precedence.Note that this field cannot be set when spec.os.name is windows.+optional
seLinuxOptions SELinuxOptions SELinuxOptions
seccompProfile SeccompProfile SeccompProfile
windowsOptions WindowsSecurityContextOptions WindowsSecurityContextOptions

信号量引用

SemaphoreRef 是 Semaphore 的引用

属性

名称 类型 Go类型 必填 默认值 描述 示例
configMapKeyRef ConfigMapKeySelector ConfigMapKeySelector
namespace string string "[namespace of workflow]"

序列

Sequence将工作流步骤扩展为数值范围

属性

名称 类型 Go类型 必填 默认值 描述 示例
count IntOrString IntOrString
end IntOrString IntOrString
format string string Format is a printf format string to format the value in the sequence
start IntOrString IntOrString

ServiceAccountTokenProjection

ServiceAccountTokenProjection 表示一个投影的服务账户令牌卷。该投影可用于将服务账户令牌插入到 Pod 运行时文件系统中,以便用于访问 API(Kubernetes API 服务器或其他 API)。

属性

名称 类型 Go类型 必填 默认值 描述 示例
audience string string audience is the intended audience of the token. A recipient of a tokenmust identify itself with an identifier specified in the audience of thetoken, and otherwise should reject the token. The audience defaults to theidentifier of the apiserver.+optional
expirationSeconds int64 (formatted integer) int64 expirationSeconds is the requested duration of validity of the serviceaccount token. As the token approaches expiration, the kubelet volumeplugin will proactively rotate the service account token. The kubelet willstart trying to rotate the token if the token is older than 80 percent ofits time to live or if the token is older than 24 hours.Defaults to 1 hourand must be at least 10 minutes.+optional
path string string path is the path relative to the mount point of the file to project thetoken into.

SleepAction 休眠操作

属性

名称 类型 Go类型 必填 默认值 描述 示例
seconds int64 (formatted integer) int64 Seconds is the number of seconds to sleep.

存储介质

名称 类型 Go类型 默认值 描述 示例
StorageMedium string string

StorageOS卷源

属性

名称 类型 Go类型 必填 默认值 描述 示例
fsType string string fsType is the filesystem type to mount.Must be a filesystem type supported by the host operating system.Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.+optional
readOnly boolean bool readOnly defaults to false (read/write). ReadOnly here will forcethe ReadOnly setting in VolumeMounts.+optional
secretRef LocalObjectReference LocalObjectReference
volumeName string string volumeName is the human-readable name of the StorageOS volume. Volumenames are only unique within a namespace.
volumeNamespace string string volumeNamespace specifies the scope of the volume within StorageOS. If nonamespace is specified then the Pod's namespace will be used. This allows theKubernetes name scoping to be mirrored within StorageOS for tighter integration.Set VolumeName to any name to override the default behaviour.Set to "default" if you are not using namespaces within StorageOS.Namespaces that do not pre-exist within StorageOS will be created.+optional

SupplementalGroupsPolicy 补充组策略

SupplementalGroupsPolicy 定义了如何计算第一个容器进程的补充组。 +enum

名称 类型 Go类型 默认值 描述 示例
SupplementalGroupsPolicy string string SupplementalGroupsPolicy定义了如何计算第一个容器进程的补充组。+枚举

SuppliedValueFrom

interface{}

暂停模板

SuspendTemplate是一种模板子类型,用于在预定的时间点暂停工作流

属性

名称 类型 Go类型 必填 默认值 描述 示例
duration string string Duration is the seconds to wait before automatically resuming a template. Must be a string. Default unit is seconds.Could also be a Duration, e.g.: "2m", "6h"

同步

同步机制包含同步锁的配置

属性

名称 类型 Go类型 必填 默认值 描述 示例
mutex Mutex Mutex
mutexes []Mutex []*Mutex v3.6 and after: Mutexes holds the list of Mutex lock details
semaphore SemaphoreRef SemaphoreRef
semaphores []SemaphoreRef []*SemaphoreRef v3.6 and after: Semaphores holds the list of Semaphores configuration

Sysctl(系统控制)

Sysctl定义了需要设置的内核参数

属性

名称 类型 Go类型 必填 默认值 描述 示例
name string string Name of a property to set
value string string Value of a property to set

TCPSocket操作

TCPSocketAction 描述了一个基于打开套接字的操作

属性

名称 类型 Go类型 必填 默认值 描述 示例
host string string Optional: Host name to connect to, defaults to the pod IP.+optional
port IntOrString IntOrString

污点效应

+枚举

名称 类型 Go类型 默认值 描述 示例
TaintEffect string string +enum

Tar策略

TarStrategy 在保存时会将文件或目录进行 tar 打包和 gzip 压缩

属性

名称 类型 Go语言类型 是否必需 默认值 描述 示例
compressionLevel int32 (formatted integer) int32 CompressionLevel specifies the gzip compression level to use for the artifact.Defaults to gzip.DefaultCompression.

模板

模板是工作流中可重复使用和组合的执行单元

属性

名称 类型 Go语言类型 是否必需 默认值 描述 示例
activeDeadlineSeconds IntOrString IntOrString
affinity Affinity Affinity
archiveLocation ArtifactLocation ArtifactLocation
automountServiceAccountToken boolean bool AutomountServiceAccountToken indicates whether a service account token should be automatically mounted in pods.ServiceAccountName of ExecutorConfig must be specified if this value is false.
container Container Container
containerSet ContainerSetTemplate ContainerSetTemplate
daemon boolean bool Daemon will allow a workflow to proceed to the next step so long as the container reaches readiness
dag DAGTemplate DAGTemplate
data Data Data
executor ExecutorConfig ExecutorConfig
failFast boolean bool FailFast, if specified, will fail this template if any of its child pods has failed. This is useful for when thistemplate is expanded with withItems, etc.
hostAliases []HostAlias []*HostAlias HostAliases is an optional list of hosts and IPs that will be injected into the pod spec+patchStrategy=merge+patchMergeKey=ip
http HTTP HTTP
initContainers []UserContainer []*UserContainer InitContainers is a list of containers which run before the main container.+patchStrategy=merge+patchMergeKey=name
inputs Inputs Inputs
memoize Memoize Memoize
metadata Metadata Metadata
metrics Metrics Metrics
name string string Name is the name of the template
nodeSelector map of string map[string]string NodeSelector is a selector to schedule this step of the workflow to berun on the selected node(s). Overrides the selector set at the workflow level.
outputs Outputs Outputs
parallelism int64 (formatted integer) int64 Parallelism limits the max total parallel pods that can execute at the same time within theboundaries of this template invocation. If additional steps/dag templates are invoked, thepods created by those templates will not be counted towards this total.
plugin Plugin Plugin
podSpecPatch string string PodSpecPatch holds strategic merge patch to apply against the pod spec. Allows parameterization ofcontainer fields which are not strings (e.g. resource limits).
priority int32 (formatted integer) int32 Priority to apply to workflow pods.
priorityClassName string string PriorityClassName to apply to workflow pods.
resource ResourceTemplate ResourceTemplate
retryStrategy RetryStrategy RetryStrategy
schedulerName string string If specified, the pod will be dispatched by specified scheduler.Or it will be dispatched by workflow scope scheduler if specified.If neither specified, the pod will be dispatched by default scheduler.+optional
script ScriptTemplate ScriptTemplate
securityContext PodSecurityContext PodSecurityContext
serviceAccountName string string ServiceAccountName to apply to workflow pods
sidecars []UserContainer []*UserContainer Sidecars is a list of containers which run alongside the main containerSidecars are automatically killed when the main container completes+patchStrategy=merge+patchMergeKey=name
steps []ParallelSteps []ParallelSteps Steps define a series of sequential/parallel workflow steps
suspend SuspendTemplate SuspendTemplate
synchronization Synchronization Synchronization
timeout string string Timeout allows to set the total node execution timeout duration counting from the node's start time.This duration also includes time in which the node spends in Pending state. This duration may not be applied to Step or DAG templates.
tolerations []Toleration []*Toleration Tolerations to apply to workflow pods.+patchStrategy=merge+patchMergeKey=key
volumes []Volume []*Volume Volumes is a list of volumes that can be mounted by containers in a template.+patchStrategy=merge+patchMergeKey=name

模板引用

属性

名称 类型 Go语言类型 是否必需 默认值 描述 示例
clusterScope boolean bool ClusterScope indicates the referred template is cluster scoped (i.e. a ClusterWorkflowTemplate).
name string string Name is the resource name of the template.
template string string Template is the name of referred template in the resource.

TerminationMessagePolicy 终止消息策略

+枚举

名称 类型 Go类型 默认值 描述 示例
终止消息策略 string string +enum

容忍度

该容忍度所附加的Pod会容忍任何与三元组匹配的污点,使用匹配操作符

属性

名称 类型 Go类型 必填 默认值 描述 示例
effect TaintEffect TaintEffect
key string string Key is the taint key that the toleration applies to. Empty means match all taint keys.If the key is empty, operator must be Exists; this combination means to match all values and all keys.+optional
operator TolerationOperator TolerationOperator
tolerationSeconds int64 (formatted integer) int64 TolerationSeconds represents the period of time the toleration (which must beof effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,it is not set, which means tolerate the taint forever (do not evict). Zero andnegative values will be treated as 0 (evict immediately) by the system.+optional
value string string Value is the taint value the toleration matches to.If the operator is Exists, the value should be empty, otherwise just a regular string.+optional

TolerationOperator

+枚举

名称 类型 Go类型 默认值 描述 示例
TolerationOperator string string +enum

转换

[]TransformationStep

转换步骤

属性

名称 类型 Go类型 必填 默认值 描述 示例
expression string string Expression defines an expr expression to apply

类型

名称 类型 Go类型 默认值 描述 示例
类型 int64 (格式化整数) int64

TypedLocalObjectReference

不建议使用此类型的新用途,因为在嵌入API时难以描述其用法。 1. 无效的用法帮助。无法为个别用法添加具体帮助。在大多数嵌入式用法中,存在特定限制,例如"只能引用类型A和B"或"不识别UID"或"名称必须受限"。这些限制在嵌入时无法很好地描述。 2. 不一致的验证。由于用法不同,验证规则也因用法而异,这使得用户难以预测会发生什么。 3. 字段既不精确又过于精确。Kind与URL不是精确的映射关系。这可能在解释过程中产生歧义,并需要REST映射。在大多数情况下,依赖的是group,resource元组,而实际结构的版本无关紧要。 4. 我们无法轻易更改它。由于此类型嵌入在许多位置,对此类型的更新将影响众多模式。不要让新的API嵌入它们无法控制的未充分指定的API类型。

与其使用此类型,不如创建一个本地提供和使用的类型,该类型应专注于您的引用。 例如,准入注册的ServiceReferences:https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 。 +structType=atomic

属性

名称 类型 Go类型 必填 默认值 描述 示例
apiGroup string string APIGroup is the group for the resource being referenced.If APIGroup is not specified, the specified Kind must be in the core API group.For any other third-party types, APIGroup is required.+optional
kind string string Kind is the type of resource being referenced
name string string Name is the name of resource being referenced

TypedObjectReference

TypedObjectReference 包含足够的信息,可让您定位到类型化的引用对象

属性

名称 类型 Go类型 必填 默认值 描述 示例
apiGroup string string APIGroup is the group for the resource being referenced.If APIGroup is not specified, the specified Kind must be in the core API group.For any other third-party types, APIGroup is required.+optional
kind string string Kind is the type of resource being referenced
name string string Name is the name of resource being referenced
namespace string string Namespace is the namespace of resource being referencedNote that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details.(Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled.+featureGate=CrossNamespaceVolumeDataSource+optional

UID

UID是一种用于保存唯一ID值的类型,包括UUID。由于我们不仅使用UUID,因此它是字符串的别名。作为一种类型,它能体现设计意图并有助于确保UID和名称不会被混淆。

名称 类型 Go类型 默认值 描述 示例
UID string string UID是一种用于保存唯一ID值的类型,包括UUID。因为我们不仅使用UUID,所以这是string的别名。作为一种类型可以明确意图,并有助于确保UID和名称不会被混淆。

URI方案

URIScheme 标识用于连接到主机以执行 Get 操作的方案 +enum

名称 类型 Go类型 默认值 描述 示例
URIScheme string string URIScheme标识用于连接到主机以执行Get操作的方案+枚举

用户容器

属性

名称 类型 Go类型 必填 默认值 描述 示例
args []string []string Arguments to the entrypoint.The container image's CMD is used if this is not provided.Variable references $(VAR_NAME) are expanded using the container's environment. If a variablecannot be resolved, the reference in the input string will be unchanged. Double $$ are reducedto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" willproduce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardlessof whether the variable exists or not. Cannot be updated.More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell+optional+listType=atomic
command []string []string Entrypoint array. Not executed within a shell.The container image's ENTRYPOINT is used if this is not provided.Variable references $(VAR_NAME) are expanded using the container's environment. If a variablecannot be resolved, the reference in the input string will be unchanged. Double $$ are reducedto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" willproduce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardlessof whether the variable exists or not. Cannot be updated.More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell+optional+listType=atomic
env []EnvVar []*EnvVar List of environment variables to set in the container.Cannot be updated.+optional+patchMergeKey=name+patchStrategy=merge+listType=map+listMapKey=name
envFrom []EnvFromSource []*EnvFromSource List of sources to populate environment variables in the container.The keys defined within a source must be a C_IDENTIFIER. All invalid keyswill be reported as an event when the container is starting. When a key exists in multiplesources, the value associated with the last source will take precedence.Values defined by an Env with a duplicate key will take precedence.Cannot be updated.+optional+listType=atomic
image string string Container image name.More info: https://kubernetes.io/docs/concepts/containers/imagesThis field is optional to allow higher level config management to default or overridecontainer images in workload controllers like Deployments and StatefulSets.+optional
imagePullPolicy PullPolicy PullPolicy
lifecycle Lifecycle Lifecycle
livenessProbe Probe Probe
mirrorVolumeMounts boolean bool MirrorVolumeMounts will mount the same volumes specified in the main containerto the container (including artifacts), at the same mountPaths. This enablesdind daemon to partially see the same filesystem as the main container inorder to use features such as docker volume binding
name string string Name of the container specified as a DNS_LABEL.Each container in a pod must have a unique name (DNS_LABEL).Cannot be updated.
ports []ContainerPort []*ContainerPort List of ports to expose from the container. Not specifying a port hereDOES NOT prevent that port from being exposed. Any port which islistening on the default "0.0.0.0" address inside a container will beaccessible from the network.Modifying this array with strategic merge patch may corrupt the data.For more information See https://github.com/kubernetes/kubernetes/issues/108255.Cannot be updated.+optional+patchMergeKey=containerPort+patchStrategy=merge+listType=map+listMapKey=containerPort+listMapKey=protocol
readinessProbe Probe Probe
resizePolicy []ContainerResizePolicy []*ContainerResizePolicy Resources resize policy for the container.+featureGate=InPlacePodVerticalScaling+optional+listType=atomic
resources ResourceRequirements ResourceRequirements
restartPolicy ContainerRestartPolicy ContainerRestartPolicy
securityContext SecurityContext SecurityContext
startupProbe Probe Probe
stdin boolean bool Whether this container should allocate a buffer for stdin in the container runtime. If thisis not set, reads from stdin in the container will always result in EOF.Default is false.+optional
stdinOnce boolean bool Whether the container runtime should close the stdin channel after it has been opened bya single attach. When stdin is true the stdin stream will remain open across multiple attachsessions. If stdinOnce is set to true, stdin is opened on container start, is empty until thefirst client attaches to stdin, and then remains open and accepts data until the client disconnects,at which time stdin is closed and remains closed until the container is restarted. If thisflag is false, a container processes that reads from stdin will never receive an EOF.Default is false+optional
terminationMessagePath string string Optional: Path at which the file to which the container's termination messagewill be written is mounted into the container's filesystem.Message written is intended to be brief final status, such as an assertion failure message.Will be truncated by the node if greater than 4096 bytes. The total message length acrossall containers will be limited to 12kb.Defaults to /dev/termination-log.Cannot be updated.+optional
terminationMessagePolicy TerminationMessagePolicy TerminationMessagePolicy
tty boolean bool Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.Default is false.+optional
volumeDevices []VolumeDevice []*VolumeDevice volumeDevices is the list of block devices to be used by the container.+patchMergeKey=devicePath+patchStrategy=merge+listType=map+listMapKey=devicePath+optional
volumeMounts []VolumeMount []*VolumeMount Pod volumes to mount into the container's filesystem.Cannot be updated.+optional+patchMergeKey=mountPath+patchStrategy=merge+listType=map+listMapKey=mountPath
workingDir string string Container's working directory.If not specified, the container runtime's default will be used, whichmight be configured in the container image.Cannot be updated.+optional

值来源

ValueFrom 描述了获取参数值的位置来源

属性

名称 类型 Go类型 必填 默认值 描述 示例
configMapKeyRef ConfigMapKeySelector ConfigMapKeySelector
default AnyString AnyString
event string string Selector (https://github.com/expr-lang/expr) that is evaluated against the event to get the value of the parameter. E.g. payload.message
expression string string Expression, if defined, is evaluated to specify the value for the parameter
jqFilter string string JQFilter expression against the resource object in resource templates
jsonPath string string JSONPath of a resource to retrieve an output parameter value from in resource templates
parameter string string Parameter reference to a step or dag task in which to retrieve an output parameter value from(e.g. '{{steps.mystep.outputs.myparam}}')
path string string Path in the container to retrieve an output parameter value from in container templates
supplied SuppliedValueFrom SuppliedValueFrom

存储卷

属性

名称 类型 Go类型 必填 默认值 描述 示例
awsElasticBlockStore AWSElasticBlockStoreVolumeSource AWSElasticBlockStoreVolumeSource
azureDisk AzureDiskVolumeSource AzureDiskVolumeSource
azureFile AzureFileVolumeSource AzureFileVolumeSource
cephfs CephFSVolumeSource CephFSVolumeSource
cinder CinderVolumeSource CinderVolumeSource
configMap ConfigMapVolumeSource ConfigMapVolumeSource
csi CSIVolumeSource CSIVolumeSource
downwardAPI DownwardAPIVolumeSource DownwardAPIVolumeSource
emptyDir EmptyDirVolumeSource EmptyDirVolumeSource
ephemeral EphemeralVolumeSource EphemeralVolumeSource
fc FCVolumeSource FCVolumeSource
flexVolume FlexVolumeSource FlexVolumeSource
flocker FlockerVolumeSource FlockerVolumeSource
gcePersistentDisk GCEPersistentDiskVolumeSource GCEPersistentDiskVolumeSource
gitRepo GitRepoVolumeSource GitRepoVolumeSource
glusterfs GlusterfsVolumeSource GlusterfsVolumeSource
hostPath HostPathVolumeSource HostPathVolumeSource
image ImageVolumeSource ImageVolumeSource
iscsi ISCSIVolumeSource ISCSIVolumeSource
name string string name of the volume.Must be a DNS_LABEL and unique within the pod.More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
nfs NFSVolumeSource NFSVolumeSource
persistentVolumeClaim PersistentVolumeClaimVolumeSource PersistentVolumeClaimVolumeSource
photonPersistentDisk PhotonPersistentDiskVolumeSource PhotonPersistentDiskVolumeSource
portworxVolume PortworxVolumeSource PortworxVolumeSource
projected ProjectedVolumeSource ProjectedVolumeSource
quobyte QuobyteVolumeSource QuobyteVolumeSource
rbd RBDVolumeSource RBDVolumeSource
scaleIO ScaleIOVolumeSource ScaleIOVolumeSource
secret SecretVolumeSource SecretVolumeSource
storageos StorageOSVolumeSource StorageOSVolumeSource
vsphereVolume VsphereVirtualDiskVolumeSource VsphereVirtualDiskVolumeSource

卷设备

属性

名称 类型 Go类型 必填 默认值 描述 示例
devicePath string string devicePath is the path inside of the container that the device will be mapped to.
name string string name must match the name of a persistentVolumeClaim in the pod

卷挂载

属性

名称 类型 Go类型 必填 默认值 描述 示例
mountPath string string Path within the container at which the volume should be mounted. Mustnot contain ':'.
mountPropagation MountPropagationMode MountPropagationMode
name string string This must match the Name of a Volume.
readOnly boolean bool Mounted read-only if true, read-write otherwise (false or unspecified).Defaults to false.+optional
recursiveReadOnly RecursiveReadOnlyMode RecursiveReadOnlyMode
subPath string string Path within the volume from which the container's volume should be mounted.Defaults to "" (volume's root).+optional
subPathExpr string string Expanded path within the volume from which the container's volume should be mounted.Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment.Defaults to "" (volume's root).SubPathExpr and SubPath are mutually exclusive.+optional

卷投影

必须设置这些字段中的一个。

属性

名称 类型 Go类型 必填 默认值 描述 示例
clusterTrustBundle ClusterTrustBundleProjection ClusterTrustBundleProjection
configMap ConfigMapProjection ConfigMapProjection
downwardAPI DownwardAPIProjection DownwardAPIProjection
secret SecretProjection SecretProjection
serviceAccountToken ServiceAccountTokenProjection ServiceAccountTokenProjection

卷资源需求

属性

名称 类型 Go类型 必填 默认值 描述 示例
limits ResourceList ResourceList
requests ResourceList ResourceList

VsphereVirtualDiskVolumeSource

属性

名称 类型 Go类型 必填 默认值 描述 示例
fsType string string fsType is filesystem type to mount.Must be a filesystem type supported by the host operating system.Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.+optional
storagePolicyID string string storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.+optional
storagePolicyName string string storagePolicyName is the storage Policy Based Management (SPBM) profile name.+optional
volumePath string string volumePath is the path that identifies vSphere volume vmdk

WeightedPodAffinityTerm

所有匹配的WeightedPodAffinityTerm字段的权重会按节点相加,以找到最优先的节点

属性

名称 类型 Go类型 必填 默认值 描述 示例
podAffinityTerm PodAffinityTerm PodAffinityTerm
weight int32 (formatted integer) int32 weight associated with matching the corresponding podAffinityTerm,in the range 1-100.

Windows安全上下文选项

属性

名称 类型 Go类型 必填 默认值 描述 示例
gmsaCredentialSpec string string GMSACredentialSpec is where the GMSA admission webhook(https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of theGMSA credential spec named by the GMSACredentialSpecName field.+optional
gmsaCredentialSpecName string string GMSACredentialSpecName is the name of the GMSA credential spec to use.+optional
hostProcess boolean bool HostProcess determines if a container should be run as a 'Host Process' container.All of a Pod's containers must have the same effective HostProcess value(it is not allowed to have a mix of HostProcess containers and non-HostProcess containers).In addition, if HostProcess is true then HostNetwork must also be set to true.+optional
runAsUserName string string The UserName in Windows to run the entrypoint of the container process.Defaults to the user specified in image metadata if unspecified.May also be set in PodSecurityContext. If set in both SecurityContext andPodSecurityContext, the value specified in SecurityContext takes precedence.+optional

工作流

属性

名称 类型 Go类型 必填 默认值 描述 示例
metadata ObjectMeta ObjectMeta

Zip策略

ZipStrategy 将解压已压缩的输入工件

interface{}


有问题吗?

Search on GitHub Discussions and Slack.