Skip to content

Build [config.openshift.io/v1]

Description

Build configures the behavior of OpenShift builds for the entire cluster. This includes default settings that can be overridden in BuildConfig objects, and overrides which are applied to all builds.

The canonical name is "cluster"

Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).

Type
`object`
Required
  • spec

Specification

Property Type Description
apiVersion string 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
kind string 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
metadata ObjectMeta Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec object spec holds user-settable values for the build controller configuration

.spec

Description
spec holds user-settable values for the build controller configuration
Type
`object`
Property Type Description
additionalTrustedCA object additionalTrustedCA is a reference to a ConfigMap containing additional CAs that should be trusted for image pushes and pulls during builds. The namespace for this config map is openshift-config.
DEPRECATED: Additional CAs for image pull and push should be set on image.config.openshift.io/cluster instead.
buildDefaults object buildDefaults controls the default information for Builds
buildOverrides object buildOverrides controls override settings for builds

.spec.additionalTrustedCA

Description

additionalTrustedCA is a reference to a ConfigMap containing additional CAs that should be trusted for image pushes and pulls during builds. The namespace for this config map is openshift-config.

DEPRECATED: Additional CAs for image pull and push should be set on image.config.openshift.io/cluster instead.

Type
`object`
Required
  • name
Property Type Description
name string name is the metadata.name of the referenced config map

.spec.buildDefaults

Description
buildDefaults controls the default information for Builds
Type
`object`
Property Type Description
defaultProxy object defaultProxy contains the default proxy settings for all build operations, including image pull/push and source download.
Values can be overrode by setting the HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables in the build config’s strategy.
env array env is a set of default environment variables that will be applied to the build if the specified variables do not exist on the build
env[] object EnvVar represents an environment variable present in a Container.
gitProxy object gitProxy contains the proxy settings for git operations only. If set, this will override any Proxy settings for all git commands, such as git clone.
Values that are not set here will be inherited from DefaultProxy.
imageLabels array imageLabels is a list of docker labels that are applied to the resulting image. User can override a default label by providing a label with the same name in their Build/BuildConfig.
imageLabels[] object
resources object resources defines resource requirements to execute the build.

.spec.buildDefaults.defaultProxy

Description

defaultProxy contains the default proxy settings for all build operations, including image pull/push and source download.

Values can be overrode by setting the HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables in the build config’s strategy.

Type
`object`
Property Type Description
httpProxy string httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var.
httpsProxy string httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var.
noProxy string noProxy is a comma-separated list of hostnames and/or CIDRs and/or IPs for which the proxy should not be used. Empty means unset and will not result in an env var.
readinessEndpoints array (string) readinessEndpoints is a list of endpoints used to verify readiness of the proxy.
trustedCA object trustedCA is a reference to a ConfigMap containing a CA certificate bundle. The trustedCA field should only be consumed by a proxy validator. The validator is responsible for reading the certificate bundle from the required key "ca-bundle.crt", merging it with the system default trust bundle, and writing the merged trust bundle to a ConfigMap named "trusted-ca-bundle" in the "openshift-config-managed" namespace. Clients that expect to make proxy connections must use the trusted-ca-bundle for all HTTPS requests to the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as well.
The namespace for the ConfigMap referenced by trustedCA is "openshift-config". Here is an example ConfigMap (in yaml):
apiVersion: v1 kind: ConfigMap metadata: name: user-ca-bundle namespace: openshift-config data: ca-bundle.crt: | -----BEGIN CERTIFICATE----- Custom CA certificate bundle. -----END CERTIFICATE-----

.spec.buildDefaults.defaultProxy.trustedCA

Description

trustedCA is a reference to a ConfigMap containing a CA certificate bundle. The trustedCA field should only be consumed by a proxy validator. The validator is responsible for reading the certificate bundle from the required key "ca-bundle.crt", merging it with the system default trust bundle, and writing the merged trust bundle to a ConfigMap named "trusted-ca-bundle" in the "openshift-config-managed" namespace. Clients that expect to make proxy connections must use the trusted-ca-bundle for all HTTPS requests to the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as well.

The namespace for the ConfigMap referenced by trustedCA is "openshift-config". Here is an example ConfigMap (in yaml):

apiVersion: v1 kind: ConfigMap metadata: name: user-ca-bundle namespace: openshift-config data: ca-bundle.crt: | -----BEGIN CERTIFICATE----- Custom CA certificate bundle. -----END CERTIFICATE-----

Type
`object`
Required
  • name
Property Type Description
name string name is the metadata.name of the referenced config map

.spec.buildDefaults.env

Description
env is a set of default environment variables that will be applied to the build if the specified variables do not exist on the build
Type
`array`

.spec.buildDefaults.env[]

Description
EnvVar represents an environment variable present in a Container.
Type
`object`
Required
  • name
Property Type Description
name string Name of the environment variable. May consist of any printable ASCII characters except '='.
value string 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 "".
valueFrom object Source for the environment variable’s value. Cannot be used if value is not empty.

.spec.buildDefaults.env[].valueFrom

Description
Source for the environment variable’s value. Cannot be used if value is not empty.
Type
`object`
Property Type Description
configMapKeyRef object Selects a key of a ConfigMap.
fieldRef object 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.
fileKeyRef object FileKeyRef selects a key of the env file. Requires the EnvFiles feature gate to be enabled.
resourceFieldRef object 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.
secretKeyRef object Selects a key of a secret in the pod’s namespace

.spec.buildDefaults.env[].valueFrom.configMapKeyRef

Description
Selects a key of a ConfigMap.
Type
`object`
Required
  • key
Property Type Description
key string The key to select.
name string Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
optional boolean Specify whether the ConfigMap or its key must be defined

.spec.buildDefaults.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
Property Type Description
apiVersion string Version of the schema the FieldPath is written in terms of, defaults to "v1".
fieldPath string Path of the field to select in the specified API version.

.spec.buildDefaults.env[].valueFrom.fileKeyRef

Description
FileKeyRef selects a key of the env file. Requires the EnvFiles feature gate to be enabled.
Type
`object`
Required
  • key
  • path
  • volumeName
Property Type Description
key string The key within the env file. An invalid key will prevent the pod from starting. The keys defined within a source may consist of any printable ASCII characters except '='. During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
optional boolean Specify whether the file or its key must be defined. If the file or key does not exist, then the env var is not published. If optional is set to true and the specified key does not exist, the environment variable will not be set in the Pod’s containers.
If optional is set to false and the specified key does not exist, an error will be returned during Pod creation.
path string The path within the volume from which to select the file. Must be relative and may not contain the '..' path or start with '..'.
volumeName string The name of the volume mount containing the env file.

.spec.buildDefaults.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
Property Type Description
containerName string Container name: required for volumes, optional for env vars
divisor integer-or-string Specifies the output format of the exposed resources, defaults to "1"
resource string Required: resource to select

.spec.buildDefaults.env[].valueFrom.secretKeyRef

Description
Selects a key of a secret in the pod’s namespace
Type
`object`
Required
  • key
Property Type Description
key string The key of the secret to select from. Must be a valid secret key.
name string Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
optional boolean Specify whether the Secret or its key must be defined

.spec.buildDefaults.gitProxy

Description

gitProxy contains the proxy settings for git operations only. If set, this will override any Proxy settings for all git commands, such as git clone.

Values that are not set here will be inherited from DefaultProxy.

Type
`object`
Property Type Description
httpProxy string httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var.
httpsProxy string httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var.
noProxy string noProxy is a comma-separated list of hostnames and/or CIDRs and/or IPs for which the proxy should not be used. Empty means unset and will not result in an env var.
readinessEndpoints array (string) readinessEndpoints is a list of endpoints used to verify readiness of the proxy.
trustedCA object trustedCA is a reference to a ConfigMap containing a CA certificate bundle. The trustedCA field should only be consumed by a proxy validator. The validator is responsible for reading the certificate bundle from the required key "ca-bundle.crt", merging it with the system default trust bundle, and writing the merged trust bundle to a ConfigMap named "trusted-ca-bundle" in the "openshift-config-managed" namespace. Clients that expect to make proxy connections must use the trusted-ca-bundle for all HTTPS requests to the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as well.
The namespace for the ConfigMap referenced by trustedCA is "openshift-config". Here is an example ConfigMap (in yaml):
apiVersion: v1 kind: ConfigMap metadata: name: user-ca-bundle namespace: openshift-config data: ca-bundle.crt: | -----BEGIN CERTIFICATE----- Custom CA certificate bundle. -----END CERTIFICATE-----

.spec.buildDefaults.gitProxy.trustedCA

Description

trustedCA is a reference to a ConfigMap containing a CA certificate bundle. The trustedCA field should only be consumed by a proxy validator. The validator is responsible for reading the certificate bundle from the required key "ca-bundle.crt", merging it with the system default trust bundle, and writing the merged trust bundle to a ConfigMap named "trusted-ca-bundle" in the "openshift-config-managed" namespace. Clients that expect to make proxy connections must use the trusted-ca-bundle for all HTTPS requests to the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as well.

The namespace for the ConfigMap referenced by trustedCA is "openshift-config". Here is an example ConfigMap (in yaml):

apiVersion: v1 kind: ConfigMap metadata: name: user-ca-bundle namespace: openshift-config data: ca-bundle.crt: | -----BEGIN CERTIFICATE----- Custom CA certificate bundle. -----END CERTIFICATE-----

Type
`object`
Required
  • name
Property Type Description
name string name is the metadata.name of the referenced config map

.spec.buildDefaults.imageLabels

Description
imageLabels is a list of docker labels that are applied to the resulting image. User can override a default label by providing a label with the same name in their Build/BuildConfig.
Type
`array`

.spec.buildDefaults.imageLabels[]

Description

Type
`object`
Property Type Description
name string name defines the name of the label. It must have non-zero length.
value string value defines the literal value of the label.

.spec.buildDefaults.resources

Description
resources defines resource requirements to execute the build.
Type
`object`
Property Type Description
claims array Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.
This field depends on the DynamicResourceAllocation feature gate.
This field is immutable. It can only be set for containers.
claims[] object ResourceClaim references one entry in PodSpec.ResourceClaims.
limits integer-or-string Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
requests integer-or-string 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/

.spec.buildDefaults.resources.claims

Description

Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.

This field depends on the DynamicResourceAllocation feature gate.

This field is immutable. It can only be set for containers.

Type
`array`

.spec.buildDefaults.resources.claims[]

Description
ResourceClaim references one entry in PodSpec.ResourceClaims.
Type
`object`
Required
  • name
Property Type Description
name string Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
request string Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request.

.spec.buildOverrides

Description
buildOverrides controls override settings for builds
Type
`object`
Property Type Description
forcePull boolean forcePull overrides, if set, the equivalent value in the builds, i.e. false disables force pull for all builds, true enables force pull for all builds, independently of what each build specifies itself
imageLabels array imageLabels is a list of docker labels that are applied to the resulting image. If user provided a label in their Build/BuildConfig with the same name as one in this list, the user’s label will be overwritten.
imageLabels[] object
nodeSelector object (string) nodeSelector is a selector which must be true for the build pod to fit on a node
tolerations array tolerations is a list of Tolerations that will override any existing tolerations set on a build pod.
tolerations[] object The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.

.spec.buildOverrides.imageLabels

Description
imageLabels is a list of docker labels that are applied to the resulting image. If user provided a label in their Build/BuildConfig with the same name as one in this list, the user’s label will be overwritten.
Type
`array`

.spec.buildOverrides.imageLabels[]

Description

Type
`object`
Property Type Description
name string name defines the name of the label. It must have non-zero length.
value string value defines the literal value of the label.

.spec.buildOverrides.tolerations

Description
tolerations is a list of Tolerations that will override any existing tolerations set on a build pod.
Type
`array`

.spec.buildOverrides.tolerations[]

Description
The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.
Type
`object`
Property Type Description
effect string Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
key string Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.
operator string Operator represents a key’s relationship to the value. Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).
tolerationSeconds integer TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.
value string Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.

API endpoints

The following API endpoints are available:

  • /apis/config.openshift.io/v1/builds

    • DELETE: delete collection of Build
    • GET: list objects of kind Build
    • POST: create a Build
  • /apis/config.openshift.io/v1/builds/{name}

    • DELETE: delete a Build
    • GET: read the specified Build
    • PATCH: partially update the specified Build
    • PUT: replace the specified Build
  • /apis/config.openshift.io/v1/builds/{name}/status

    • GET: read status of the specified Build
    • PATCH: partially update status of the specified Build
    • PUT: replace status of the specified Build

/apis/config.openshift.io/v1/builds

HTTP method
`DELETE`
Description
delete collection of Build

HTTP responses

HTTP code Reponse body
200 - OK Status schema
401 - Unauthorized Empty
HTTP method
`GET`
Description
list objects of kind Build

HTTP responses

HTTP code Reponse body
200 - OK BuildList schema
401 - Unauthorized Empty
HTTP method
`POST`
Description
create a Build

Query parameters

Parameter Type Description
dryRun string When 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
fieldValidation string fieldValidation 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

Parameter Type Description
body Build schema

HTTP responses

HTTP code Reponse body
200 - OK Build schema
201 - Created Build schema
202 - Accepted Build schema
401 - Unauthorized Empty

/apis/config.openshift.io/v1/builds/{name}

Global path parameters

Parameter Type Description
name string name of the Build
HTTP method
`DELETE`
Description
delete a Build

Query parameters

Parameter Type Description
dryRun string When 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 code Reponse body
200 - OK Status schema
202 - Accepted Status schema
401 - Unauthorized Empty
HTTP method
`GET`
Description
read the specified Build

HTTP responses

HTTP code Reponse body
200 - OK Build schema
401 - Unauthorized Empty
HTTP method
`PATCH`
Description
partially update the specified Build

Query parameters

Parameter Type Description
dryRun string When 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
fieldValidation string fieldValidation 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 code Reponse body
200 - OK Build schema
401 - Unauthorized Empty
HTTP method
`PUT`
Description
replace the specified Build

Query parameters

Parameter Type Description
dryRun string When 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
fieldValidation string fieldValidation 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

Parameter Type Description
body Build schema

HTTP responses

HTTP code Reponse body
200 - OK Build schema
201 - Created Build schema
401 - Unauthorized Empty

/apis/config.openshift.io/v1/builds/{name}/status

Global path parameters

Parameter Type Description
name string name of the Build
HTTP method
`GET`
Description
read status of the specified Build

HTTP responses

HTTP code Reponse body
200 - OK Build schema
401 - Unauthorized Empty
HTTP method
`PATCH`
Description
partially update status of the specified Build

Query parameters

Parameter Type Description
dryRun string When 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
fieldValidation string fieldValidation 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 code Reponse body
200 - OK Build schema
401 - Unauthorized Empty
HTTP method
`PUT`
Description
replace status of the specified Build

Query parameters

Parameter Type Description
dryRun string When 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
fieldValidation string fieldValidation 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

Parameter Type Description
body Build schema

HTTP responses

HTTP code Reponse body
200 - OK Build schema
201 - Created Build schema
401 - Unauthorized Empty