This is a cache of https://docs.okd.io/4.15/rest_api/config_apis/build-config-openshift-io-v1.html. It is a snapshot of the page at 2024-11-23T21:28:52.071+0000.
Build [config.openshift.io/v1] - Config <strong>api</strong>s | <strong>api</strong> reference | OKD 4.15
×

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. Must be a C_IDENTIFIER.

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.

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. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?

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.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. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?

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 is an alpha field and requires enabling 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 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.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.

.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 and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.

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

Table 1. HTTP responses
HTTP code Reponse body

200 - OK

Status schema

401 - Unauthorized

Empty

HTTP method

GET

Description

list objects of kind Build

Table 2. HTTP responses
HTTP code Reponse body

200 - OK

BuildList schema

401 - Unauthorized

Empty

HTTP method

POST

Description

create a Build

Table 3. 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.

Table 4. Body parameters
Parameter Type Description

body

Build schema

Table 5. 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}

Table 6. Global path parameters
Parameter Type Description

name

string

name of the Build

HTTP method

DELETE

Description

delete a Build

Table 7. 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

Table 8. 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

Table 9. HTTP responses
HTTP code Reponse body

200 - OK

Build schema

401 - Unauthorized

Empty

HTTP method

PATCH

Description

partially update the specified Build

Table 10. 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.

Table 11. HTTP responses
HTTP code Reponse body

200 - OK

Build schema

401 - Unauthorized

Empty

HTTP method

PUT

Description

replace the specified Build

Table 12. 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.

Table 13. Body parameters
Parameter Type Description

body

Build schema

Table 14. 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

Table 15. Global path parameters
Parameter Type Description

name

string

name of the Build

HTTP method

GET

Description

read status of the specified Build

Table 16. HTTP responses
HTTP code Reponse body

200 - OK

Build schema

401 - Unauthorized

Empty

HTTP method

PATCH

Description

partially update status of the specified Build

Table 17. 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.

Table 18. HTTP responses
HTTP code Reponse body

200 - OK

Build schema

401 - Unauthorized

Empty

HTTP method

PUT

Description

replace status of the specified Build

Table 19. 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.

Table 20. Body parameters
Parameter Type Description

body

Build schema

Table 21. HTTP responses
HTTP code Reponse body

200 - OK

Build schema

201 - Created

Build schema

401 - Unauthorized

Empty