StepAction [tekton.dev/v1]

Description
StepAction represents the actionable components of Step. The Step can only reference it from the cluster or using remote resolution.
Type
object

Specification

PropertyTypeDescription
apiVersionstring

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kindstring

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadataObjectMeta

ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

specobject

Spec holds the desired state of the Step from the client

.spec

Description
Spec holds the desired state of the Step from the client
Type
object
PropertyTypeDescription
argsarray

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

commandarray

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

descriptionstring

Description is a user-facing description of the stepaction that may be used to populate a UI.

envarray

List of environment variables to set in the container. Cannot be updated.

imagestring

Image reference name to run for this StepAction. More info: https://kubernetes.io/docs/concepts/containers/images

paramsarray

Params is a list of input parameters required to run the stepAction. Params must be supplied as inputs in Steps unless they declare a defaultvalue.

resultsarray

Results are values that this StepAction can output

scriptstring

Script is the contents of an executable file to execute.

If Script is not empty, the Step cannot have an Command and the Args will be passed to the Script.

securityContextobject

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/ The value set in StepAction will take precedence over the value from Task.

volumeMountsarray

Volumes to mount into the Step's filesystem. Cannot be updated.

workingDirstring

Step's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.

.spec.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.args[]

Type
string

.spec.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.command[]

Type
string

.spec.env

Description
List of environment variables to set in the container. Cannot be updated.
Type
array

.spec.env[]

Description
EnvVar represents an environment variable present in a Container.
Type
object
Required
name
PropertyTypeDescription
namestring

Name of the environment variable. Must be a C_IDENTIFIER.

valuestring

Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. 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. Defaults to "".

valueFromobject

Source for the environment variable's value. Cannot be used if value is not empty.

.spec.env[].valueFrom

Description
Source for the environment variable's value. Cannot be used if value is not empty.
Type
object
PropertyTypeDescription
configMapKeyRefobject

Selects a key of a ConfigMap.

fieldRefobject

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.

resourceFieldRefobject

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.

secretKeyRefobject

Selects a key of a secret in the pod's namespace

.spec.env[].valueFrom.configMapKeyRef

Description
Selects a key of a ConfigMap.
Type
object
Required
key
PropertyTypeDescription
keystring

The key to select.

namestring

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

optionalboolean

Specify whether the ConfigMap or its key must be defined

.spec.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
PropertyTypeDescription
apiVersionstring

Version of the schema the FieldPath is written in terms of, defaults to "v1".

fieldPathstring

Path of the field to select in the specified API version.

.spec.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
PropertyTypeDescription
containerNamestring

Container name: required for volumes, optional for env vars

divisor

Specifies the output format of the exposed resources, defaults to "1"

resourcestring

Required: resource to select

.spec.env[].valueFrom.secretKeyRef

Description
Selects a key of a secret in the pod's namespace
Type
object
Required
key
PropertyTypeDescription
keystring

The key of the secret to select from. Must be a valid secret key.

namestring

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

optionalboolean

Specify whether the Secret or its key must be defined

.spec.params

Description
Params is a list of input parameters required to run the stepAction. Params must be supplied as inputs in Steps unless they declare a defaultvalue.
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
PropertyTypeDescription
defaultobject

Default is the value a parameter takes if no input value is supplied. If default is set, a Task may be executed without a supplied value for the parameter.

descriptionstring

Description is a user-facing description of the parameter that may be used to populate a UI.

enumarray

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.

namestring

Name declares the name by which a parameter is referenced.

propertiesobject

Properties is the JSON Schema properties to support key-value pairs parameter.

typestring

Type is the user-specified type of the parameter. The possible types are currently "string", "array" and "object", and "string" is the default.

.spec.params[].default

Description
Default is the value a parameter takes if no input value is supplied. If default is set, a Task may be executed without a supplied value for the parameter.
Type
object
PropertyTypeDescription
arrayValarray
objectValobject
stringValstring
typestring

ParamType indicates the type of an input parameter; Used to distinguish between a single string and an array of strings.

.spec.params[].default.arrayVal

Type
array

.spec.params[].default.arrayVal[]

Type
string

.spec.params[].default.objectVal

Type
object

.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 StepAction can output
Type
array

.spec.results[]

Description
StepResult used to describe the Results of a Step. This is field is at an BETA stability level and gated by "enable-step-actions" feature flag.
Type
object
Required
name
PropertyTypeDescription
descriptionstring

Description is a human-readable description of the result

namestring

Name the given name

propertiesobject

Properties is the JSON Schema properties to support key-value pairs results.

typestring

The possible types are 'string', 'array', and 'object', with 'string' as the default.

.spec.results[].properties

Description
Properties is the JSON Schema properties to support key-value pairs results.
Type
object

.spec.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/ The value set in StepAction will take precedence over the value from Task.
Type
object
PropertyTypeDescription
allowPrivilegeEscalationboolean

AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is:

  1. run as Privileged
  2. has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.
capabilitiesobject

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.

privilegedboolean

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.

procMountstring

procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.

readOnlyRootFilesystemboolean

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.

runAsGroupinteger

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 and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.

runAsNonRootboolean

Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does 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 and PodSecurityContext, the value specified in SecurityContext takes precedence.

runAsUserinteger

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 and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.

seLinuxOptionsobject

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.

seccompProfileobject

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.

windowsOptionsobject

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.

.spec.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
PropertyTypeDescription
addarray

Added capabilities

droparray

Removed capabilities

.spec.securityContext.capabilities.add

Description
Added capabilities
Type
array

.spec.securityContext.capabilities.add[]

Description
Capability represent POSIX capabilities type
Type
string

.spec.securityContext.capabilities.drop

Description
Removed capabilities
Type
array

.spec.securityContext.capabilities.drop[]

Description
Capability represent POSIX capabilities type
Type
string

.spec.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
PropertyTypeDescription
levelstring

Level is SELinux level label that applies to the container.

rolestring

Role is a SELinux role label that applies to the container.

typestring

Type is a SELinux type label that applies to the container.

userstring

User is a SELinux user label that applies to the container.

.spec.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
PropertyTypeDescription
localhostProfilestring

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.

typestring

type indicates which kind of seccomp profile will be applied. Valid options are:

Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.

.spec.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
PropertyTypeDescription
gmsaCredentialSpecstring

GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.

gmsaCredentialSpecNamestring

GMSACredentialSpecName is the name of the GMSA credential spec to use.

hostProcessboolean

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.

runAsUserNamestring

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 and PodSecurityContext, the value specified in SecurityContext takes precedence.

.spec.volumeMounts

Description
Volumes to mount into the Step's filesystem. Cannot be updated.
Type
array

.spec.volumeMounts[]

Description
VolumeMount describes a mounting of a Volume within a container.
Type
object
Required
mountPathname
PropertyTypeDescription
mountPathstring

Path within the container at which the volume should be mounted. Must not contain ':'.

mountPropagationstring

mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.

namestring

This must match the Name of a Volume.

readOnlyboolean

Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.

subPathstring

Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).

subPathExprstring

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.

API Endpoints

The following API endpoints are available:

  • /apis/tekton.dev/v1alpha1/namespaces/{namespace}/stepactions
    • DELETE: delete collection of StepAction
    • GET: list objects of kind StepAction
    • POST: create a new StepAction
  • /apis/tekton.dev/v1alpha1/namespaces/{namespace}/stepactions/{name}
    • DELETE: delete the specified StepAction
    • GET: read the specified StepAction
    • PATCH: partially update the specified StepAction
    • PUT: replace the specified StepAction

/apis/tekton.dev/v1alpha1/namespaces/{namespace}/stepactions

HTTP method
DELETE
Description
delete collection of StepAction
HTTP responses
HTTP codeResponse body
200 - OKStatus schema
401 - UnauthorizedEmpty
HTTP method
GET
Description
list objects of kind StepAction
HTTP responses
HTTP codeResponse body
200 - OKStepActionList schema
401 - UnauthorizedEmpty
HTTP method
POST
Description
create a new StepAction
Query parameters
ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
Body parameters
ParameterTypeDescription
bodyStepAction schemaapplication/json formatted
HTTP responses
HTTP codeResponse body
200 - OKStepAction schema
201 - CreatedStepAction schema
202 - AcceptedStepAction schema
401 - UnauthorizedEmpty

/apis/tekton.dev/v1alpha1/namespaces/{namespace}/stepactions/{name}

HTTP method
DELETE
Description
delete the specified StepAction
Query parameters
ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
HTTP responses
HTTP codeResponse body
200 - OKStatus schema
202 - AcceptedStatus schema
401 - UnauthorizedEmpty
HTTP method
GET
Description
read the specified StepAction
HTTP responses
HTTP codeResponse body
200 - OKStepAction schema
401 - UnauthorizedEmpty
HTTP method
PATCH
Description
partially update the specified StepAction
Query parameters
ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
HTTP responses
HTTP codeResponse body
200 - OKStepAction schema
401 - UnauthorizedEmpty
HTTP method
PUT
Description
replace the specified StepAction
Query parameters
ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
Body parameters
ParameterTypeDescription
bodyStepAction schemaapplication/json formatted
HTTP responses
HTTP codeResponse body
200 - OKStepAction schema
201 - CreatedStepAction schema
401 - UnauthorizedEmpty