Task [tekton.dev/v1]
- Description
- 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.
- Type
object
Specification
.spec
- Description
- Spec holds the desired state of the Task from the client
- Type
object
.spec.params
- Description
- 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.
- Type
array
.spec.params[]
- Description
- ParamSpec defines arbitrary parameters needed beyond typed inputs (such as resources). Parameter values are provided by users as inputs on a TaskRun or PipelineRun.
- Type
object- Required
name
.spec.params[].enum
- Description
- 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.
- Type
array
.spec.params[].enum[]
- Type
string
.spec.params[].properties
- Description
- Properties is the JSON Schema properties to support key-value pairs parameter.
- Type
object
.spec.results
- Description
- Results are values that this Task can output
- Type
array
.spec.results[]
- Description
- TaskResult used to describe the results of a task
- Type
object- Required
name
.spec.results[].properties
- Description
- Properties is the JSON Schema properties to support key-value pairs results.
- Type
object
.spec.sidecars
- Description
- Sidecars are run alongside the Task's step containers. They begin before the steps start and end after the steps complete.
- Type
array
.spec.sidecars[]
- Description
- Sidecar has nearly the same data structure as Step but does not have the ability to timeout.
- Type
object- Required
name
.spec.sidecars[].args
- Description
- 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
- Type
array
.spec.sidecars[].args[]
- Type
string
.spec.sidecars[].command
- Description
- 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
- Type
array
.spec.sidecars[].command[]
- Type
string
.spec.sidecars[].computeResources
- Description
- ComputeResources required by this Sidecar. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- Type
object
.spec.sidecars[].computeResources.claims
- Description
- 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.
- Type
array
.spec.sidecars[].computeResources.claims[]
- Description
- ResourceClaim references one entry in PodSpec.ResourceClaims.
- Type
object- Required
name
.spec.sidecars[].computeResources.limits
- Description
- Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- Type
object
.spec.sidecars[].computeResources.requests
- Description
- 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/
- Type
object
.spec.sidecars[].env
- Description
- List of environment variables to set in the Sidecar. Cannot be updated.
- Type
array
.spec.sidecars[].env[]
- Description
- EnvVar represents an environment variable present in a Container.
- Type
object- Required
name
.spec.sidecars[].env[].valueFrom
- Description
- Source for the environment variable's value. Cannot be used if value is not empty.
- Type
object
.spec.sidecars[].env[].valueFrom.configMapKeyRef
- Description
- Selects a key of a ConfigMap.
- Type
object- Required
key
.spec.sidecars[].env[].valueFrom.fieldRef
- Description
- 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.
- Type
object- Required
fieldPath
.spec.sidecars[].env[].valueFrom.resourceFieldRef
- Description
- 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.
- Type
object- Required
resource
.spec.sidecars[].env[].valueFrom.secretKeyRef
- Description
- Selects a key of a secret in the pod's namespace
- Type
object- Required
key
.spec.sidecars[].envFrom
- Description
- 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.
- Type
array
.spec.sidecars[].envFrom[]
- Description
- EnvFromSource represents the source of a set of ConfigMaps
- Type
object
.spec.sidecars[].envFrom[].configMapRef
- Description
- The ConfigMap to select from
- Type
object
.spec.sidecars[].envFrom[].secretRef
- Description
- The Secret to select from
- Type
object
.spec.sidecars[].lifecycle
- Description
- Actions that the management system should take in response to Sidecar lifecycle events. Cannot be updated.
- Type
object
.spec.sidecars[].lifecycle.postStart
- Description
- 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
- Type
object
.spec.sidecars[].lifecycle.postStart.exec
- Description
- Exec specifies a command to execute in the container.
- Type
object
.spec.sidecars[].lifecycle.postStart.exec.command
- Description
- 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.
- Type
array
.spec.sidecars[].lifecycle.postStart.exec.command[]
- Type
string
.spec.sidecars[].lifecycle.postStart.httpGet
- Description
- HTTPGet specifies an HTTP GET request to perform.
- Type
object- Required
port
.spec.sidecars[].lifecycle.postStart.httpGet.httpHeaders
- Description
- Custom headers to set in the request. HTTP allows repeated headers.
- Type
array
.spec.sidecars[].lifecycle.postStart.httpGet.httpHeaders[]
- Description
- HTTPHeader describes a custom header to be used in HTTP probes
- Type
object- Required
namevalue
.spec.sidecars[].lifecycle.postStart.sleep
- Description
- Sleep represents a duration that the container should sleep.
- Type
object- Required
seconds
.spec.sidecars[].lifecycle.postStart.tcpSocket
- Description
- 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.
- Type
object- Required
port
.spec.sidecars[].lifecycle.preStop
- Description
- 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
- Type
object
.spec.sidecars[].lifecycle.preStop.exec
- Description
- Exec specifies a command to execute in the container.
- Type
object
.spec.sidecars[].lifecycle.preStop.exec.command
- Description
- 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.
- Type
array
.spec.sidecars[].lifecycle.preStop.exec.command[]
- Type
string
.spec.sidecars[].lifecycle.preStop.httpGet
- Description
- HTTPGet specifies an HTTP GET request to perform.
- Type
object- Required
port
.spec.sidecars[].lifecycle.preStop.httpGet.httpHeaders
- Description
- Custom headers to set in the request. HTTP allows repeated headers.
- Type
array
.spec.sidecars[].lifecycle.preStop.httpGet.httpHeaders[]
- Description
- HTTPHeader describes a custom header to be used in HTTP probes
- Type
object- Required
namevalue
.spec.sidecars[].lifecycle.preStop.sleep
- Description
- Sleep represents a duration that the container should sleep.
- Type
object- Required
seconds
.spec.sidecars[].lifecycle.preStop.tcpSocket
- Description
- 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.
- Type
object- Required
port
.spec.sidecars[].livenessProbe
- Description
- 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
- Type
object
.spec.sidecars[].livenessProbe.exec
- Description
- Exec specifies a command to execute in the container.
- Type
object
.spec.sidecars[].livenessProbe.exec.command
- Description
- 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.
- Type
array
.spec.sidecars[].livenessProbe.exec.command[]
- Type
string
.spec.sidecars[].livenessProbe.grpc
- Description
- GRPC specifies a GRPC HealthCheckRequest.
- Type
object- Required
port
.spec.sidecars[].livenessProbe.httpGet
- Description
- HTTPGet specifies an HTTP GET request to perform.
- Type
object- Required
port
.spec.sidecars[].livenessProbe.httpGet.httpHeaders
- Description
- Custom headers to set in the request. HTTP allows repeated headers.
- Type
array
.spec.sidecars[].livenessProbe.httpGet.httpHeaders[]
- Description
- HTTPHeader describes a custom header to be used in HTTP probes
- Type
object- Required
namevalue
.spec.sidecars[].livenessProbe.tcpSocket
- Description
- TCPSocket specifies a connection to a TCP port.
- Type
object- Required
port
.spec.sidecars[].ports
- Description
- 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.
- Type
array
.spec.sidecars[].ports[]
- Description
- ContainerPort represents a network port in a single container.
- Type
object- Required
containerPort
.spec.sidecars[].readinessProbe
- Description
- 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
- Type
object
.spec.sidecars[].readinessProbe.exec
- Description
- Exec specifies a command to execute in the container.
- Type
object
.spec.sidecars[].readinessProbe.exec.command
- Description
- 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.
- Type
array
.spec.sidecars[].readinessProbe.exec.command[]
- Type
string
.spec.sidecars[].readinessProbe.grpc
- Description
- GRPC specifies a GRPC HealthCheckRequest.
- Type
object- Required
port
.spec.sidecars[].readinessProbe.httpGet
- Description
- HTTPGet specifies an HTTP GET request to perform.
- Type
object- Required
port
.spec.sidecars[].readinessProbe.httpGet.httpHeaders
- Description
- Custom headers to set in the request. HTTP allows repeated headers.
- Type
array
.spec.sidecars[].readinessProbe.httpGet.httpHeaders[]
- Description
- HTTPHeader describes a custom header to be used in HTTP probes
- Type
object- Required
namevalue
.spec.sidecars[].readinessProbe.tcpSocket
- Description
- TCPSocket specifies a connection to a TCP port.
- Type
object- Required
port
.spec.sidecars[].securityContext
- Description
- 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/
- Type
object
.spec.sidecars[].securityContext.appArmorProfile
- Description
- 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.
- Type
object- Required
type
.spec.sidecars[].securityContext.capabilities
- Description
- 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.
- Type
object
.spec.sidecars[].securityContext.capabilities.add
- Description
- Added capabilities
- Type
array
.spec.sidecars[].securityContext.capabilities.add[]
- Description
- Capability represent POSIX capabilities type
- Type
string
.spec.sidecars[].securityContext.capabilities.drop
- Description
- Removed capabilities
- Type
array
.spec.sidecars[].securityContext.capabilities.drop[]
- Description
- Capability represent POSIX capabilities type
- Type
string
.spec.sidecars[].securityContext.seLinuxOptions
- Description
- 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.
- Type
object
.spec.sidecars[].securityContext.seccompProfile
- Description
- 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.
- Type
object- Required
type
.spec.sidecars[].securityContext.windowsOptions
- Description
- 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.
- Type
object
.spec.sidecars[].startupProbe
- Description
- 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
- Type
object
.spec.sidecars[].startupProbe.exec
- Description
- Exec specifies a command to execute in the container.
- Type
object
.spec.sidecars[].startupProbe.exec.command
- Description
- 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.
- Type
array
.spec.sidecars[].startupProbe.exec.command[]
- Type
string
.spec.sidecars[].startupProbe.grpc
- Description
- GRPC specifies a GRPC HealthCheckRequest.
- Type
object- Required
port
.spec.sidecars[].startupProbe.httpGet
- Description
- HTTPGet specifies an HTTP GET request to perform.
- Type
object- Required
port
.spec.sidecars[].startupProbe.httpGet.httpHeaders
- Description
- Custom headers to set in the request. HTTP allows repeated headers.
- Type
array
.spec.sidecars[].startupProbe.httpGet.httpHeaders[]
- Description
- HTTPHeader describes a custom header to be used in HTTP probes
- Type
object- Required
namevalue
.spec.sidecars[].startupProbe.tcpSocket
- Description
- TCPSocket specifies a connection to a TCP port.
- Type
object- Required
port
.spec.sidecars[].volumeDevices
- Description
- volumeDevices is the list of block devices to be used by the Sidecar.
- Type
array
.spec.sidecars[].volumeDevices[]
- Description
- volumeDevice describes a mapping of a raw block device within a container.
- Type
object- Required
devicePathname
.spec.sidecars[].volumeMounts
- Description
- Volumes to mount into the Sidecar's filesystem. Cannot be updated.
- Type
array
.spec.sidecars[].volumeMounts[]
- Description
- VolumeMount describes a mounting of a Volume within a container.
- Type
object- Required
mountPathname
.spec.sidecars[].workspaces
- Description
- 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.
- Type
array
.spec.sidecars[].workspaces[]
- Description
- WorkspaceUsage is used by a Step or Sidecar to declare that it wants isolated access to a Workspace defined in a Task.
- Type
object- Required
mountPathname
.spec.stepTemplate
- Description
- StepTemplate can be used as the basis for all step containers within the Task, so that the steps inherit settings on the base container.
- Type
object
.spec.stepTemplate.args
- Description
- 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
- Type
array
.spec.stepTemplate.args[]
- Type
string
.spec.stepTemplate.command
- Description
- 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
- Type
array
.spec.stepTemplate.command[]
- Type
string
.spec.stepTemplate.computeResources
- Description
- ComputeResources required by this Step. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- Type
object
.spec.stepTemplate.computeResources.claims
- Description
- 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.
- Type
array
.spec.stepTemplate.computeResources.claims[]
- Description
- ResourceClaim references one entry in PodSpec.ResourceClaims.
- Type
object- Required
name
.spec.stepTemplate.computeResources.limits
- Description
- Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- Type
object
.spec.stepTemplate.computeResources.requests
- Description
- 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/
- Type
object
.spec.stepTemplate.env
- Description
- List of environment variables to set in the Step. Cannot be updated.
- Type
array
.spec.stepTemplate.env[]
- Description
- EnvVar represents an environment variable present in a Container.
- Type
object- Required
name
.spec.stepTemplate.env[].valueFrom
- Description
- Source for the environment variable's value. Cannot be used if value is not empty.
- Type
object
.spec.stepTemplate.env[].valueFrom.configMapKeyRef
- Description
- Selects a key of a ConfigMap.
- Type
object- Required
key
.spec.stepTemplate.env[].valueFrom.fieldRef
- Description
- 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.
- Type
object- Required
fieldPath
.spec.stepTemplate.env[].valueFrom.resourceFieldRef
- Description
- 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.
- Type
object- Required
resource
.spec.stepTemplate.env[].valueFrom.secretKeyRef
- Description
- Selects a key of a secret in the pod's namespace
- Type
object- Required
key
.spec.stepTemplate.envFrom
- Description
- 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.
- Type
array
.spec.stepTemplate.envFrom[]
- Description
- EnvFromSource represents the source of a set of ConfigMaps
- Type
object
.spec.stepTemplate.envFrom[].configMapRef
- Description
- The ConfigMap to select from
- Type
object
.spec.stepTemplate.envFrom[].secretRef
- Description
- The Secret to select from
- Type
object
.spec.stepTemplate.securityContext
- Description
- 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/
- Type
object
.spec.stepTemplate.securityContext.appArmorProfile
- Description
- 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.
- Type
object- Required
type
.spec.stepTemplate.securityContext.capabilities
- Description
- 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.
- Type
object
.spec.stepTemplate.securityContext.capabilities.add
- Description
- Added capabilities
- Type
array
.spec.stepTemplate.securityContext.capabilities.add[]
- Description
- Capability represent POSIX capabilities type
- Type
string
.spec.stepTemplate.securityContext.capabilities.drop
- Description
- Removed capabilities
- Type
array
.spec.stepTemplate.securityContext.capabilities.drop[]
- Description
- Capability represent POSIX capabilities type
- Type
string
.spec.stepTemplate.securityContext.seLinuxOptions
- Description
- 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.
- Type
object
.spec.stepTemplate.securityContext.seccompProfile
- Description
- 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.
- Type
object- Required
type
.spec.stepTemplate.securityContext.windowsOptions
- Description
- 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.
- Type
object
.spec.stepTemplate.volumeDevices
- Description
- volumeDevices is the list of block devices to be used by the Step.
- Type
array
.spec.stepTemplate.volumeDevices[]
- Description
- volumeDevice describes a mapping of a raw block device within a container.
- Type
object- Required
devicePathname
.spec.stepTemplate.volumeMounts
- Description
- Volumes to mount into the Step's filesystem. Cannot be updated.
- Type
array
.spec.stepTemplate.volumeMounts[]
- Description
- VolumeMount describes a mounting of a Volume within a container.
- Type
object- Required
mountPathname
.spec.steps
- Description
- Steps are the steps of the build; each step is run sequentially with the source mounted into /workspace.
- Type
array
.spec.steps[]
- Description
- Step runs a subcomponent of a Task
- Type
object- Required
name
.spec.steps[].args
- Description
- 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
- Type
array
.spec.steps[].args[]
- Type
string
.spec.steps[].command
- Description
- 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
- Type
array
.spec.steps[].command[]
- Type
string
.spec.steps[].computeResources
- Description
- ComputeResources required by this Step. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- Type
object
.spec.steps[].computeResources.claims
- Description
- 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.
- Type
array
.spec.steps[].computeResources.claims[]
- Description
- ResourceClaim references one entry in PodSpec.ResourceClaims.
- Type
object- Required
name
.spec.steps[].computeResources.limits
- Description
- Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- Type
object
.spec.steps[].computeResources.requests
- Description
- 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/
- Type
object
.spec.steps[].env
- Description
- List of environment variables to set in the Step. Cannot be updated.
- Type
array
.spec.steps[].env[]
- Description
- EnvVar represents an environment variable present in a Container.
- Type
object- Required
name
.spec.steps[].env[].valueFrom
- Description
- Source for the environment variable's value. Cannot be used if value is not empty.
- Type
object
.spec.steps[].env[].valueFrom.configMapKeyRef
- Description
- Selects a key of a ConfigMap.
- Type
object- Required
key
.spec.steps[].env[].valueFrom.fieldRef
- Description
- 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.
- Type
object- Required
fieldPath
.spec.steps[].env[].valueFrom.resourceFieldRef
- Description
- 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.
- Type
object- Required
resource
.spec.steps[].env[].valueFrom.secretKeyRef
- Description
- Selects a key of a secret in the pod's namespace
- Type
object- Required
key
.spec.steps[].envFrom
- Description
- 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.
- Type
array
.spec.steps[].envFrom[]
- Description
- EnvFromSource represents the source of a set of ConfigMaps
- Type
object
.spec.steps[].envFrom[].configMapRef
- Description
- The ConfigMap to select from
- Type
object
.spec.steps[].envFrom[].secretRef
- Description
- The Secret to select from
- Type
object
.spec.steps[].params
- Description
- Params declares parameters passed to this step action.
- Type
array
.spec.steps[].params[]
- Description
- Param declares an ParamValues to use for the parameter called name.
- Type
object- Required
namevalue
.spec.steps[].ref
- Description
- Contains the reference to an existing StepAction.
- Type
object
.spec.steps[].ref.params
- Description
- 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.
- Type
array
.spec.steps[].ref.params[]
- Description
- Param declares an ParamValues to use for the parameter called name.
- Type
object- Required
namevalue
.spec.steps[].results
- Description
- 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.
- Type
array
.spec.steps[].results[]
- Description
- StepResult used to describe the Results of a Step.
- Type
object- Required
name
.spec.steps[].results[].properties
- Description
- Properties is the JSON Schema properties to support key-value pairs results.
- Type
object
.spec.steps[].securityContext
- Description
- 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/
- Type
object
.spec.steps[].securityContext.appArmorProfile
- Description
- 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.
- Type
object- Required
type
.spec.steps[].securityContext.capabilities
- Description
- 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.
- Type
object
.spec.steps[].securityContext.capabilities.add
- Description
- Added capabilities
- Type
array
.spec.steps[].securityContext.capabilities.add[]
- Description
- Capability represent POSIX capabilities type
- Type
string
.spec.steps[].securityContext.capabilities.drop
- Description
- Removed capabilities
- Type
array
.spec.steps[].securityContext.capabilities.drop[]
- Description
- Capability represent POSIX capabilities type
- Type
string
.spec.steps[].securityContext.seLinuxOptions
- Description
- 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.
- Type
object
.spec.steps[].securityContext.seccompProfile
- Description
- 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.
- Type
object- Required
type
.spec.steps[].securityContext.windowsOptions
- Description
- 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.
- Type
object
.spec.steps[].stderrConfig
- Description
- Stores configuration for the stderr stream of the step.
- Type
object
.spec.steps[].stdoutConfig
- Description
- Stores configuration for the stdout stream of the step.
- Type
object
.spec.steps[].volumeDevices
- Description
- volumeDevices is the list of block devices to be used by the Step.
- Type
array
.spec.steps[].volumeDevices[]
- Description
- volumeDevice describes a mapping of a raw block device within a container.
- Type
object- Required
devicePathname
.spec.steps[].volumeMounts
- Description
- Volumes to mount into the Step's filesystem. Cannot be updated.
- Type
array
.spec.steps[].volumeMounts[]
- Description
- VolumeMount describes a mounting of a Volume within a container.
- Type
object- Required
mountPathname
.spec.steps[].when
- Description
- When is a list of when expressions that need to be true for the task to run
- Type
array
.spec.steps[].when[]
- Description
- 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
- Type
object
.spec.steps[].when[].values
- Description
- Values is an array of strings, which is compared against the input, for guard checking It must be non-empty
- Type
array
.spec.steps[].when[].values[]
- Type
string
.spec.steps[].workspaces
- Description
- 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.
- Type
array
.spec.steps[].workspaces[]
- Description
- WorkspaceUsage is used by a Step or Sidecar to declare that it wants isolated access to a Workspace defined in a Task.
- Type
object- Required
mountPathname
.spec.workspaces
- Description
- Workspaces are the volumes that this Task requires.
- Type
array
.spec.workspaces[]
- Description
- WorkspaceDeclaration is a declaration of a volume that a Task requires.
- Type
object- Required
name
API Endpoints
The following API endpoints are available:
/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 method
DELETE- Description
- delete collection of Task
- HTTP responses
- HTTP method
GET- Description
- list objects of kind Task
- HTTP responses
- HTTP method
POST- Description
- create a new Task
- Query parameters
- Body parameters
- HTTP responses
/apis/tekton.dev/v1/namespaces/{namespace}/tasks/{name}
- HTTP method
DELETE- Description
- delete the specified Task
- Query parameters
- HTTP responses
- HTTP method
GET- Description
- read the specified Task
- HTTP responses
- HTTP method
PATCH- Description
- partially update the specified Task
- Query parameters
- HTTP responses
- HTTP method
PUT- Description
- replace the specified Task
- Query parameters
- Body parameters
- HTTP responses