任务 [tekton.dev/v1]
- 描述
- Task represents a collection of sequential steps that are run as part of a Pipeline using a set of inputs and producing a set of outputs. Tasks execute when TaskRuns are created that provide the input parameters and resources and output resources the Task requires.
- 类型
object
规格
.spec
- 描述
- Spec holds the desired state of the Task from the client
- 类型
object
.spec.params
- 描述
- Params is a list of input parameters required to run the task. Params must be supplied as inputs in TaskRuns unless they declare a default value.
- 类型
array
.spec.params[]
- 描述
- ParamSpec defines arbitrary parameters needed beyond typed inputs (such as resources). Parameter values are provided by users as inputs on a TaskRun or PipelineRun.
- 类型
object- 必填
name
.spec.params[].enum
- 描述
- Enum declares a set of allowed param input values for tasks/pipelines that can be validated. If Enum is not set, no input validation is performed for the param.
- 类型
array
.spec.params[].enum[]
- 类型
string
.spec.params[].properties
- 描述
- Properties is the JSON Schema properties to support key-value pairs parameter.
- 类型
object
.spec.results
- 描述
- Results are values that this Task can output
- 类型
array
.spec.results[]
- 描述
- TaskResult used to describe the results of a task
- 类型
object- 必填
name
.spec.results[].properties
- 描述
- Properties is the JSON Schema properties to support key-value pairs results.
- 类型
object
.spec.sidecars
- 描述
- Sidecars are run alongside the Task's step containers. They begin before the steps start and end after the steps complete.
- 类型
array
.spec.sidecars[]
- 描述
- Sidecar has nearly the same data structure as Step but does not have the ability to timeout.
- 类型
object- 必填
name
.spec.sidecars[].args
- 描述
- Arguments to the entrypoint. The image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the Sidecar's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to 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 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
- 类型
array
.spec.sidecars[].args[]
- 类型
string
.spec.sidecars[].command
- 描述
- Entrypoint array. Not executed within a shell. The image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the Sidecar's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to 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 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
- 类型
array
.spec.sidecars[].command[]
- 类型
string
.spec.sidecars[].computeResources
- 描述
- ComputeResources required by this Sidecar. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- 类型
object
.spec.sidecars[].computeResources.claims
- 描述
- Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers.
- 类型
array
.spec.sidecars[].computeResources.claims[]
- 描述
- ResourceClaim references one entry in PodSpec.ResourceClaims.
- 类型
object- 必填
name
.spec.sidecars[].computeResources.limits
- 描述
- Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- 类型
object
.spec.sidecars[].computeResources.requests
- 描述
- Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- 类型
object
.spec.sidecars[].env
- 描述
- List of environment variables to set in the Sidecar. Cannot be updated.
- 类型
array
.spec.sidecars[].env[]
- 描述
- EnvVar represents an environment variable present in a Container.
- 类型
object- 必填
name
.spec.sidecars[].env[].valueFrom
- 描述
- Source for the environment variable's value. Cannot be used if value is not empty.
- 类型
object
.spec.sidecars[].env[].valueFrom.configMapKeyRef
- 描述
- Selects a key of a ConfigMap.
- 类型
object- 必填
key
.spec.sidecars[].env[].valueFrom.fieldRef
- 描述
- Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
- 类型
object- 必填
fieldPath
.spec.sidecars[].env[].valueFrom.resourceFieldRef
- 描述
- Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
- 类型
object- 必填
resource
.spec.sidecars[].env[].valueFrom.secretKeyRef
- 描述
- Selects a key of a secret in the pod's namespace
- 类型
object- 必填
key
.spec.sidecars[].envFrom
- 描述
- List of sources to populate environment variables in the Sidecar. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, 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.
- 类型
array
.spec.sidecars[].envFrom[]
- 描述
- EnvFromSource represents the source of a set of ConfigMaps
- 类型
object
.spec.sidecars[].envFrom[].configMapRef
- 描述
- The ConfigMap to select from
- 类型
object
.spec.sidecars[].envFrom[].secretRef
- 描述
- The Secret to select from
- 类型
object
.spec.sidecars[].lifecycle
- 描述
- Actions that the management system should take in response to Sidecar lifecycle events. Cannot be updated.
- 类型
object
.spec.sidecars[].lifecycle.postStart
- 描述
- PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
- 类型
object
.spec.sidecars[].lifecycle.postStart.exec
- 描述
- Exec specifies a command to execute in the container.
- 类型
object
.spec.sidecars[].lifecycle.postStart.exec.command
- 描述
- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
- 类型
array
.spec.sidecars[].lifecycle.postStart.exec.command[]
- 类型
string
.spec.sidecars[].lifecycle.postStart.httpGet
- 描述
- HTTPGet specifies an HTTP GET request to perform.
- 类型
object- 必填
port
.spec.sidecars[].lifecycle.postStart.httpGet.httpHeaders
- 描述
- Custom headers to set in the request. HTTP allows repeated headers.
- 类型
array
.spec.sidecars[].lifecycle.postStart.httpGet.httpHeaders[]
- 描述
- HTTPHeader describes a custom header to be used in HTTP probes
- 类型
object- 必填
namevalue
.spec.sidecars[].lifecycle.postStart.sleep
- 描述
- Sleep represents a duration that the container should sleep.
- 类型
object- 必填
seconds
.spec.sidecars[].lifecycle.postStart.tcpSocket
- 描述
- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for backward compatibility. There is no validation of this field and lifecycle hooks will fail at runtime when it is specified.
- 类型
object- 必填
port
.spec.sidecars[].lifecycle.preStop
- 描述
- PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
- 类型
object
.spec.sidecars[].lifecycle.preStop.exec
- 描述
- Exec specifies a command to execute in the container.
- 类型
object
.spec.sidecars[].lifecycle.preStop.exec.command
- 描述
- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
- 类型
array
.spec.sidecars[].lifecycle.preStop.exec.command[]
- 类型
string
.spec.sidecars[].lifecycle.preStop.httpGet
- 描述
- HTTPGet specifies an HTTP GET request to perform.
- 类型
object- 必填
port
.spec.sidecars[].lifecycle.preStop.httpGet.httpHeaders
- 描述
- Custom headers to set in the request. HTTP allows repeated headers.
- 类型
array
.spec.sidecars[].lifecycle.preStop.httpGet.httpHeaders[]
- 描述
- HTTPHeader describes a custom header to be used in HTTP probes
- 类型
object- 必填
namevalue
.spec.sidecars[].lifecycle.preStop.sleep
- 描述
- Sleep represents a duration that the container should sleep.
- 类型
object- 必填
seconds
.spec.sidecars[].lifecycle.preStop.tcpSocket
- 描述
- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for backward compatibility. There is no validation of this field and lifecycle hooks will fail at runtime when it is specified.
- 类型
object- 必填
port
.spec.sidecars[].livenessProbe
- 描述
- Periodic probe of Sidecar liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
- 类型
object
.spec.sidecars[].livenessProbe.exec
- 描述
- Exec specifies a command to execute in the container.
- 类型
object
.spec.sidecars[].livenessProbe.exec.command
- 描述
- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
- 类型
array
.spec.sidecars[].livenessProbe.exec.command[]
- 类型
string
.spec.sidecars[].livenessProbe.grpc
- 描述
- GRPC specifies a GRPC HealthCheckRequest.
- 类型
object- 必填
port
.spec.sidecars[].livenessProbe.httpGet
- 描述
- HTTPGet specifies an HTTP GET request to perform.
- 类型
object- 必填
port
.spec.sidecars[].livenessProbe.httpGet.httpHeaders
- 描述
- Custom headers to set in the request. HTTP allows repeated headers.
- 类型
array
.spec.sidecars[].livenessProbe.httpGet.httpHeaders[]
- 描述
- HTTPHeader describes a custom header to be used in HTTP probes
- 类型
object- 必填
namevalue
.spec.sidecars[].livenessProbe.tcpSocket
- 描述
- TCPSocket specifies a connection to a TCP port.
- 类型
object- 必填
port
.spec.sidecars[].ports
- 描述
- List of ports to expose from the Sidecar. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated.
- 类型
array
.spec.sidecars[].ports[]
- 描述
- ContainerPort represents a network port in a single container.
- 类型
object- 必填
containerPort
.spec.sidecars[].readinessProbe
- 描述
- Periodic probe of Sidecar service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
- 类型
object
.spec.sidecars[].readinessProbe.exec
- 描述
- Exec specifies a command to execute in the container.
- 类型
object
.spec.sidecars[].readinessProbe.exec.command
- 描述
- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
- 类型
array
.spec.sidecars[].readinessProbe.exec.command[]
- 类型
string
.spec.sidecars[].readinessProbe.grpc
- 描述
- GRPC specifies a GRPC HealthCheckRequest.
- 类型
object- 必填
port
.spec.sidecars[].readinessProbe.httpGet
- 描述
- HTTPGet specifies an HTTP GET request to perform.
- 类型
object- 必填
port
.spec.sidecars[].readinessProbe.httpGet.httpHeaders
- 描述
- Custom headers to set in the request. HTTP allows repeated headers.
- 类型
array
.spec.sidecars[].readinessProbe.httpGet.httpHeaders[]
- 描述
- HTTPHeader describes a custom header to be used in HTTP probes
- 类型
object- 必填
namevalue
.spec.sidecars[].readinessProbe.tcpSocket
- 描述
- TCPSocket specifies a connection to a TCP port.
- 类型
object- 必填
port
.spec.sidecars[].securityContext
- 描述
- SecurityContext defines the security options the Sidecar should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
- 类型
object
.spec.sidecars[].securityContext.appArmorProfile
- 描述
- appArmorProfile is the AppArmor options to use by this container. If set, this profile overrides the pod's appArmorProfile. Note that this field cannot be set when spec.os.name is windows.
- 类型
object- 必填
type
.spec.sidecars[].securityContext.capabilities
- 描述
- The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.
- 类型
object
.spec.sidecars[].securityContext.capabilities.add
- 描述
- Added capabilities
- 类型
array
.spec.sidecars[].securityContext.capabilities.add[]
- 描述
- Capability represent POSIX capabilities type
- 类型
string
.spec.sidecars[].securityContext.capabilities.drop
- 描述
- Removed capabilities
- 类型
array
.spec.sidecars[].securityContext.capabilities.drop[]
- 描述
- Capability represent POSIX capabilities type
- 类型
string
.spec.sidecars[].securityContext.seLinuxOptions
- 描述
- The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
- 类型
object
.spec.sidecars[].securityContext.seccompProfile
- 描述
- The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.
- 类型
object- 必填
type
.spec.sidecars[].securityContext.windowsOptions
- 描述
- The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
- 类型
object
.spec.sidecars[].startupProbe
- 描述
- StartupProbe indicates that the Pod the Sidecar is running in has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
- 类型
object
.spec.sidecars[].startupProbe.exec
- 描述
- Exec specifies a command to execute in the container.
- 类型
object
.spec.sidecars[].startupProbe.exec.command
- 描述
- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
- 类型
array
.spec.sidecars[].startupProbe.exec.command[]
- 类型
string
.spec.sidecars[].startupProbe.grpc
- 描述
- GRPC specifies a GRPC HealthCheckRequest.
- 类型
object- 必填
port
.spec.sidecars[].startupProbe.httpGet
- 描述
- HTTPGet specifies an HTTP GET request to perform.
- 类型
object- 必填
port
.spec.sidecars[].startupProbe.httpGet.httpHeaders
- 描述
- Custom headers to set in the request. HTTP allows repeated headers.
- 类型
array
.spec.sidecars[].startupProbe.httpGet.httpHeaders[]
- 描述
- HTTPHeader describes a custom header to be used in HTTP probes
- 类型
object- 必填
namevalue
.spec.sidecars[].startupProbe.tcpSocket
- 描述
- TCPSocket specifies a connection to a TCP port.
- 类型
object- 必填
port
.spec.sidecars[].volumeDevices
- 描述
- volumeDevices is the list of block devices to be used by the Sidecar.
- 类型
array
.spec.sidecars[].volumeDevices[]
- 描述
- volumeDevice describes a mapping of a raw block device within a container.
- 类型
object- 必填
devicePathname
.spec.sidecars[].volumeMounts
- 描述
- Volumes to mount into the Sidecar's filesystem. Cannot be updated.
- 类型
array
.spec.sidecars[].volumeMounts[]
- 描述
- VolumeMount describes a mounting of a Volume within a container.
- 类型
object- 必填
mountPathname
.spec.sidecars[].workspaces
- 描述
- This is an alpha field. You must set the "enable-api-fields" feature flag to "alpha" for this field to be supported. Workspaces is a list of workspaces from the Task that this Sidecar wants exclusive access to. Adding a workspace to this list means that any other Step or Sidecar that does not also request this Workspace will not have access to it.
- 类型
array
.spec.sidecars[].workspaces[]
- 描述
- WorkspaceUsage is used by a Step or Sidecar to declare that it wants isolated access to a Workspace defined in a Task.
- 类型
object- 必填
mountPathname
.spec.stepTemplate
- 描述
- StepTemplate can be used as the basis for all step containers within the Task, so that the steps inherit settings on the base container.
- 类型
object
.spec.stepTemplate.args
- 描述
- Arguments to the entrypoint. The image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the Step's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to 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 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
- 类型
array
.spec.stepTemplate.args[]
- 类型
string
.spec.stepTemplate.command
- 描述
- Entrypoint array. Not executed within a shell. The image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the Step's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to 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 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
- 类型
array
.spec.stepTemplate.command[]
- 类型
string
.spec.stepTemplate.computeResources
- 描述
- ComputeResources required by this Step. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- 类型
object
.spec.stepTemplate.computeResources.claims
- 描述
- Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers.
- 类型
array
.spec.stepTemplate.computeResources.claims[]
- 描述
- ResourceClaim references one entry in PodSpec.ResourceClaims.
- 类型
object- 必填
name
.spec.stepTemplate.computeResources.limits
- 描述
- Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- 类型
object
.spec.stepTemplate.computeResources.requests
- 描述
- Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- 类型
object
.spec.stepTemplate.env
- 描述
- List of environment variables to set in the Step. Cannot be updated.
- 类型
array
.spec.stepTemplate.env[]
- 描述
- EnvVar represents an environment variable present in a Container.
- 类型
object- 必填
name
.spec.stepTemplate.env[].valueFrom
- 描述
- Source for the environment variable's value. Cannot be used if value is not empty.
- 类型
object
.spec.stepTemplate.env[].valueFrom.configMapKeyRef
- 描述
- Selects a key of a ConfigMap.
- 类型
object- 必填
key
.spec.stepTemplate.env[].valueFrom.fieldRef
- 描述
- Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
- 类型
object- 必填
fieldPath
.spec.stepTemplate.env[].valueFrom.resourceFieldRef
- 描述
- Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
- 类型
object- 必填
resource
.spec.stepTemplate.env[].valueFrom.secretKeyRef
- 描述
- Selects a key of a secret in the pod's namespace
- 类型
object- 必填
key
.spec.stepTemplate.envFrom
- 描述
- List of sources to populate environment variables in the Step. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the Step is starting. When a key exists in multiple sources, 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.
- 类型
array
.spec.stepTemplate.envFrom[]
- 描述
- EnvFromSource represents the source of a set of ConfigMaps
- 类型
object
.spec.stepTemplate.envFrom[].configMapRef
- 描述
- The ConfigMap to select from
- 类型
object
.spec.stepTemplate.envFrom[].secretRef
- 描述
- The Secret to select from
- 类型
object
.spec.stepTemplate.securityContext
- 描述
- SecurityContext defines the security options the Step should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
- 类型
object
.spec.stepTemplate.securityContext.appArmorProfile
- 描述
- appArmorProfile is the AppArmor options to use by this container. If set, this profile overrides the pod's appArmorProfile. Note that this field cannot be set when spec.os.name is windows.
- 类型
object- 必填
type
.spec.stepTemplate.securityContext.capabilities
- 描述
- The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.
- 类型
object
.spec.stepTemplate.securityContext.capabilities.add
- 描述
- Added capabilities
- 类型
array
.spec.stepTemplate.securityContext.capabilities.add[]
- 描述
- Capability represent POSIX capabilities type
- 类型
string
.spec.stepTemplate.securityContext.capabilities.drop
- 描述
- Removed capabilities
- 类型
array
.spec.stepTemplate.securityContext.capabilities.drop[]
- 描述
- Capability represent POSIX capabilities type
- 类型
string
.spec.stepTemplate.securityContext.seLinuxOptions
- 描述
- The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
- 类型
object
.spec.stepTemplate.securityContext.seccompProfile
- 描述
- The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.
- 类型
object- 必填
type
.spec.stepTemplate.securityContext.windowsOptions
- 描述
- The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
- 类型
object
.spec.stepTemplate.volumeDevices
- 描述
- volumeDevices is the list of block devices to be used by the Step.
- 类型
array
.spec.stepTemplate.volumeDevices[]
- 描述
- volumeDevice describes a mapping of a raw block device within a container.
- 类型
object- 必填
devicePathname
.spec.stepTemplate.volumeMounts
- 描述
- Volumes to mount into the Step's filesystem. Cannot be updated.
- 类型
array
.spec.stepTemplate.volumeMounts[]
- 描述
- VolumeMount describes a mounting of a Volume within a container.
- 类型
object- 必填
mountPathname
.spec.steps
- 描述
- Steps are the steps of the build; each step is run sequentially with the source mounted into /workspace.
- 类型
array
.spec.steps[]
- 描述
- Step runs a subcomponent of a Task
- 类型
object- 必填
name
.spec.steps[].args
- 描述
- Arguments to the entrypoint. The image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to 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 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
- 类型
array
.spec.steps[].args[]
- 类型
string
.spec.steps[].command
- 描述
- Entrypoint array. Not executed within a shell. The image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to 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 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
- 类型
array
.spec.steps[].command[]
- 类型
string
.spec.steps[].computeResources
- 描述
- ComputeResources required by this Step. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- 类型
object
.spec.steps[].computeResources.claims
- 描述
- Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers.
- 类型
array
.spec.steps[].computeResources.claims[]
- 描述
- ResourceClaim references one entry in PodSpec.ResourceClaims.
- 类型
object- 必填
name
.spec.steps[].computeResources.limits
- 描述
- Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- 类型
object
.spec.steps[].computeResources.requests
- 描述
- Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- 类型
object
.spec.steps[].env
- 描述
- List of environment variables to set in the Step. Cannot be updated.
- 类型
array
.spec.steps[].env[]
- 描述
- EnvVar represents an environment variable present in a Container.
- 类型
object- 必填
name
.spec.steps[].env[].valueFrom
- 描述
- Source for the environment variable's value. Cannot be used if value is not empty.
- 类型
object
.spec.steps[].env[].valueFrom.configMapKeyRef
- 描述
- Selects a key of a ConfigMap.
- 类型
object- 必填
key
.spec.steps[].env[].valueFrom.fieldRef
- 描述
- Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
- 类型
object- 必填
fieldPath
.spec.steps[].env[].valueFrom.resourceFieldRef
- 描述
- Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
- 类型
object- 必填
resource
.spec.steps[].env[].valueFrom.secretKeyRef
- 描述
- Selects a key of a secret in the pod's namespace
- 类型
object- 必填
key
.spec.steps[].envFrom
- 描述
- List of sources to populate environment variables in the Step. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the Step is starting. When a key exists in multiple sources, 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.
- 类型
array
.spec.steps[].envFrom[]
- 描述
- EnvFromSource represents the source of a set of ConfigMaps
- 类型
object
.spec.steps[].envFrom[].configMapRef
- 描述
- The ConfigMap to select from
- 类型
object
.spec.steps[].envFrom[].secretRef
- 描述
- The Secret to select from
- 类型
object
.spec.steps[].params
- 描述
- Params declares parameters passed to this step action.
- 类型
array
.spec.steps[].params[]
- 描述
- Param declares an ParamValues to use for the parameter called name.
- 类型
object- 必填
namevalue
.spec.steps[].ref
- 描述
- Contains the reference to an existing StepAction.
- 类型
object
.spec.steps[].ref.params
- 描述
- Params contains the parameters used to identify the referenced Tekton resource. Example entries might include "repo" or "path" but the set of params ultimately depends on the chosen resolver.
- 类型
array
.spec.steps[].ref.params[]
- 描述
- Param declares an ParamValues to use for the parameter called name.
- 类型
object- 必填
namevalue
.spec.steps[].results
- 描述
- Results declares StepResults produced by the Step. It can be used in an inlined Step when used to store Results to $(step.results.resultName.path). It cannot be used when referencing StepActions using [v1.Step.Ref]. The Results declared by the StepActions will be stored here instead.
- 类型
array
.spec.steps[].results[]
- 描述
- StepResult used to describe the Results of a Step.
- 类型
object- 必填
name
.spec.steps[].results[].properties
- 描述
- Properties is the JSON Schema properties to support key-value pairs results.
- 类型
object
.spec.steps[].securityContext
- 描述
- SecurityContext defines the security options the Step should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
- 类型
object
.spec.steps[].securityContext.appArmorProfile
- 描述
- appArmorProfile is the AppArmor options to use by this container. If set, this profile overrides the pod's appArmorProfile. Note that this field cannot be set when spec.os.name is windows.
- 类型
object- 必填
type
.spec.steps[].securityContext.capabilities
- 描述
- The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.
- 类型
object
.spec.steps[].securityContext.capabilities.add
- 描述
- Added capabilities
- 类型
array
.spec.steps[].securityContext.capabilities.add[]
- 描述
- Capability represent POSIX capabilities type
- 类型
string
.spec.steps[].securityContext.capabilities.drop
- 描述
- Removed capabilities
- 类型
array
.spec.steps[].securityContext.capabilities.drop[]
- 描述
- Capability represent POSIX capabilities type
- 类型
string
.spec.steps[].securityContext.seLinuxOptions
- 描述
- The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
- 类型
object
.spec.steps[].securityContext.seccompProfile
- 描述
- The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.
- 类型
object- 必填
type
.spec.steps[].securityContext.windowsOptions
- 描述
- The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
- 类型
object
.spec.steps[].stderrConfig
- 描述
- Stores configuration for the stderr stream of the step.
- 类型
object
.spec.steps[].stdoutConfig
- 描述
- Stores configuration for the stdout stream of the step.
- 类型
object
.spec.steps[].volumeDevices
- 描述
- volumeDevices is the list of block devices to be used by the Step.
- 类型
array
.spec.steps[].volumeDevices[]
- 描述
- volumeDevice describes a mapping of a raw block device within a container.
- 类型
object- 必填
devicePathname
.spec.steps[].volumeMounts
- 描述
- Volumes to mount into the Step's filesystem. Cannot be updated.
- 类型
array
.spec.steps[].volumeMounts[]
- 描述
- VolumeMount describes a mounting of a Volume within a container.
- 类型
object- 必填
mountPathname
.spec.steps[].when
- 描述
- When is a list of when expressions that need to be true for the task to run
- 类型
array
.spec.steps[].when[]
- 描述
- WhenExpression allows a PipelineTask to declare expressions to be evaluated before the Task is run to determine whether the Task should be executed or skipped
- 类型
object
.spec.steps[].when[].values
- 描述
- Values is an array of strings, which is compared against the input, for guard checking It must be non-empty
- 类型
array
.spec.steps[].when[].values[]
- 类型
string
.spec.steps[].workspaces
- 描述
- This is an alpha field. You must set the "enable-api-fields" feature flag to "alpha" for this field to be supported. Workspaces is a list of workspaces from the Task that this Step wants exclusive access to. Adding a workspace to this list means that any other Step or Sidecar that does not also request this Workspace will not have access to it.
- 类型
array
.spec.steps[].workspaces[]
- 描述
- WorkspaceUsage is used by a Step or Sidecar to declare that it wants isolated access to a Workspace defined in a Task.
- 类型
object- 必填
mountPathname
.spec.workspaces
- 描述
- Workspaces are the volumes that this Task requires.
- 类型
array
.spec.workspaces[]
- 描述
- WorkspaceDeclaration is a declaration of a volume that a Task requires.
- 类型
object- 必填
name
API 端点
可用的 API 端点如下:
/apis/tekton.dev/v1/namespaces/{namespace}/tasksDELETE: delete collection of TaskGET: list objects of kind TaskPOST: create a new Task
/apis/tekton.dev/v1/namespaces/{namespace}/tasks/{name}DELETE: delete the specified TaskGET: read the specified TaskPATCH: partially update the specified TaskPUT: replace the specified Task
/apis/tekton.dev/v1/namespaces/{namespace}/tasks
- HTTP 方法
DELETE- 描述
- delete collection of Task
- HTTP 响应
- HTTP 方法
GET- 描述
- list objects of kind Task
- HTTP 响应
- HTTP 方法
POST- 描述
- create a new Task
- 查询参数
- 请求体参数
- HTTP 响应
/apis/tekton.dev/v1/namespaces/{namespace}/tasks/{name}
- HTTP 方法
DELETE- 描述
- delete the specified Task
- 查询参数
- HTTP 响应
- HTTP 方法
GET- 描述
- read the specified Task
- HTTP 响应
- HTTP 方法
PATCH- 描述
- partially update the specified Task
- 查询参数
- HTTP 响应
- HTTP 方法
PUT- 描述
- replace the specified Task
- 查询参数
- 请求体参数
- HTTP 响应