Knative Build Component

Packages:

build.knative.dev

Package v1alpha1 is the v1alpha1 version of the API.

Resource Types:

Build

Build represents a build of a container image. A Build is made up of a source, and a set of steps. Steps can mount volumes to share data between themselves. A build may be created by instantiating a BuildTemplate.

Field Description
apiVersion
string
build.knative.dev/v1alpha1
kind
string
Build
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
BuildSpec


generation
int64
(Optional)

TODO(dprotaso) Metadata.Generation should increment so we can drop this property when conversion webhooks enable us to migrate

source
SourceSpec
(Optional)

Source specifies the input to the build.

sources
[]SourceSpec
(Optional)

Sources specifies the inputs to the build.

steps
[]Kubernetes core/v1.Container
(Optional)

Steps are the steps of the build; each step is run sequentially with the source mounted into /workspace.

volumes
[]Kubernetes core/v1.Volume
(Optional)

Volumes is a collection of volumes that are available to mount into the steps of the build.

serviceAccountName
string
(Optional)

The name of the service account as which to run this build.

template
TemplateInstantiationSpec
(Optional)

Template, if specified, references a BuildTemplate resource to use to populate fields in the build, and optional Arguments to pass to the template. The default Kind of template is BuildTemplate

nodeSelector
map[string]string
(Optional)

NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node’s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/

timeout
Kubernetes meta/v1.Duration
(Optional)

Time after which the build times out. Defaults to 10 minutes. Specified build timeout should be less than 24h. Refer Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

affinity
Kubernetes core/v1.Affinity
(Optional)

If specified, the pod’s scheduling constraints

Status
BuildSpecStatus
(Optional)

Used for cancelling a job (and maybe more later on)

status
BuildStatus

BuildTemplate

BuildTemplate is a template that can used to easily create Builds.

Field Description
apiVersion
string
build.knative.dev/v1alpha1
kind
string
BuildTemplate
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
BuildTemplateSpec


generation
int64
(Optional)

TODO(dprotaso) Metadata.Generation should increment so we can drop this property when conversion webhooks enable us to migrate

parameters
[]ParameterSpec

Parameters defines the parameters that can be populated in a template.

steps
[]Kubernetes core/v1.Container

Steps are the steps of the build; each step is run sequentially with the source mounted into /workspace.

volumes
[]Kubernetes core/v1.Volume

Volumes is a collection of volumes that are available to mount into the steps of the build.

ClusterBuildTemplate

ClusterBuildTemplate is a template that can used to easily create Builds.

Field Description
apiVersion
string
build.knative.dev/v1alpha1
kind
string
ClusterBuildTemplate
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
BuildTemplateSpec


generation
int64
(Optional)

TODO(dprotaso) Metadata.Generation should increment so we can drop this property when conversion webhooks enable us to migrate

parameters
[]ParameterSpec

Parameters defines the parameters that can be populated in a template.

steps
[]Kubernetes core/v1.Container

Steps are the steps of the build; each step is run sequentially with the source mounted into /workspace.

volumes
[]Kubernetes core/v1.Volume

Volumes is a collection of volumes that are available to mount into the steps of the build.

ArgumentSpec

(Appears on: TemplateInstantiationSpec)

ArgumentSpec defines the actual values to use to populate a template’s parameters.

Field Description
name
string

Name is the name of the argument.

value
string

Value is the value of the argument.

BuildProvider (string alias)

(Appears on: BuildStatus)

BuildProvider defines a build execution implementation.

BuildSpec

(Appears on: Build)

BuildSpec is the spec for a Build resource.

Field Description
generation
int64
(Optional)

TODO(dprotaso) Metadata.Generation should increment so we can drop this property when conversion webhooks enable us to migrate

source
SourceSpec
(Optional)

Source specifies the input to the build.

sources
[]SourceSpec
(Optional)

Sources specifies the inputs to the build.

steps
[]Kubernetes core/v1.Container
(Optional)

Steps are the steps of the build; each step is run sequentially with the source mounted into /workspace.

volumes
[]Kubernetes core/v1.Volume
(Optional)

Volumes is a collection of volumes that are available to mount into the steps of the build.

serviceAccountName
string
(Optional)

The name of the service account as which to run this build.

template
TemplateInstantiationSpec
(Optional)

Template, if specified, references a BuildTemplate resource to use to populate fields in the build, and optional Arguments to pass to the template. The default Kind of template is BuildTemplate

nodeSelector
map[string]string
(Optional)

NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node’s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/

timeout
Kubernetes meta/v1.Duration
(Optional)

Time after which the build times out. Defaults to 10 minutes. Specified build timeout should be less than 24h. Refer Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

affinity
Kubernetes core/v1.Affinity
(Optional)

If specified, the pod’s scheduling constraints

Status
BuildSpecStatus
(Optional)

Used for cancelling a job (and maybe more later on)

BuildSpecStatus (string alias)

(Appears on: BuildSpec)

BuildSpecStatus defines the build spec status the user can provide

BuildStatus

(Appears on: Build)

BuildStatus is the status for a Build resource

Field Description
Status
github.com/knative/pkg/apis/duck/v1alpha1.Status

(Members of Status are embedded into this type.)

builder
BuildProvider
(Optional)
cluster
ClusterSpec
(Optional)

Cluster provides additional information if the builder is Cluster.

google
GoogleSpec
(Optional)

Google provides additional information if the builder is Google.

startTime
Kubernetes meta/v1.Time
(Optional)

StartTime is the time the build is actually started.

completionTime
Kubernetes meta/v1.Time
(Optional)

CompletionTime is the time the build completed.

stepStates
[]Kubernetes core/v1.ContainerState
(Optional)

StepStates describes the state of each build step container.

stepsCompleted
[]string
(Optional)

StepsCompleted lists the name of build steps completed.

BuildTemplateInterface

BuildTemplateInterface is implemented by BuildTemplate and ClusterBuildTemplate

BuildTemplateSpec

(Appears on: BuildTemplate, ClusterBuildTemplate)

BuildTemplateSpec is the spec for a BuildTemplate.

Field Description
generation
int64
(Optional)

TODO(dprotaso) Metadata.Generation should increment so we can drop this property when conversion webhooks enable us to migrate

parameters
[]ParameterSpec

Parameters defines the parameters that can be populated in a template.

steps
[]Kubernetes core/v1.Container

Steps are the steps of the build; each step is run sequentially with the source mounted into /workspace.

volumes
[]Kubernetes core/v1.Volume

Volumes is a collection of volumes that are available to mount into the steps of the build.

ClusterSpec

(Appears on: BuildStatus)

ClusterSpec provides information about the on-cluster build, if applicable.

Field Description
namespace
string

Namespace is the namespace in which the pod is running.

podName
string

PodName is the name of the pod responsible for executing this build’s steps.

GCSSourceSpec

(Appears on: SourceSpec)

GCSSourceSpec describes source input to the Build in the form of an archive, or a source manifest describing files to fetch.

Field Description
type
GCSSourceType

Type declares the style of source to fetch.

location
string

Location specifies the location of the source archive or manifest file.

GCSSourceType (string alias)

(Appears on: GCSSourceSpec)

GCSSourceType defines a type of GCS source fetch.

GitSourceSpec

(Appears on: SourceSpec)

GitSourceSpec describes a Git repo source input to the Build.

Field Description
url
string

URL of the Git repository to clone from.

revision
string

Git revision (branch, tag, commit SHA or ref) to clone. See https://git-scm.com/docs/gitrevisions#_specifying_revisions for more information.

GoogleSpec

(Appears on: BuildStatus)

GoogleSpec provides information about the GCB build, if applicable.

Field Description
operation
string

Operation is the unique name of the GCB API Operation for the build.

ParameterSpec

(Appears on: BuildTemplateSpec)

ParameterSpec defines the possible parameters that can be populated in a template.

Field Description
name
string

Name is the unique name of this template parameter.

description
string

Description is a human-readable explanation of this template parameter.

default
string

Default, if specified, defines the default value that should be applied if the build does not specify the value for this parameter.

SourceSpec

(Appears on: BuildSpec)

SourceSpec defines the input to the Build

Field Description
git
GitSourceSpec
(Optional)

Git represents source in a Git repository.

gcs
GCSSourceSpec
(Optional)

GCS represents source in Google Cloud Storage.

custom
Kubernetes core/v1.Container
(Optional)

Custom indicates that source should be retrieved using a custom process defined in a container invocation.

subPath
string
(Optional)

SubPath specifies a path within the fetched source which should be built. This option makes parent directories inaccessible to the build steps. (The specific source type may, in fact, not even fetch files not in the SubPath.)

name
string
(Optional)

Name is the name of source. This field is used to uniquely identify the source init containers Restrictions on the allowed charatcers Must be a basename (no /) Must be a valid DNS name (only alphanumeric characters, no _) https://tools.ietf.org/html/rfc1123#section-2

targetPath
string

TargetPath is the path in workspace directory where the source will be copied. TargetPath is optional and if its not set source will be copied under workspace. TargetPath should not be set for custom source.

Template

Template is an interface for accessing the BuildTemplateSpec from various forms of template (namespace-/cluster-scoped).

TemplateInstantiationSpec

(Appears on: BuildSpec)

TemplateInstantiationSpec specifies how a BuildTemplate is instantiated into a Build.

Field Description
name
string

Name references the BuildTemplate resource to use. The template is assumed to exist in the Build’s namespace.

kind
TemplateKind
(Optional)

The Kind of the template to be used, possible values are BuildTemplate or ClusterBuildTemplate. If nothing is specified, the default if is BuildTemplate

arguments
[]ArgumentSpec
(Optional)

Arguments, if specified, lists values that should be applied to the parameters specified by the template.

env
[]Kubernetes core/v1.EnvVar
(Optional)

Env, if specified will provide variables to all build template steps. This will override any of the template’s steps environment variables.

TemplateKind (string alias)

(Appears on: TemplateInstantiationSpec)

TemplateKind defines the type of BuildTemplate used by the build.


Generated with gen-crd-api-reference-docs on git commit 4fc8663f.