---
title: Build configuration resources
---

# Build configuration resources {#build-configuration}

Use the following procedure to configure build settings.

## Build controller configuration parameters {#builds-configuration-parameters_build-configuration}

The `build.config.openshift.io/cluster` resource offers the following configuration parameters.

<table>
<thead>
<tr>
  <th>Parameter</th>
  <th>Description</th>
</tr>
</thead>
<tbody>
<tr>
  <td><code>Build</code></td>
  <td>Holds cluster-wide information on how to handle builds. The canonical, and only valid name is <code>cluster</code>.<br><br><code>spec</code>: Holds user-settable values for the build controller configuration.</td>
</tr>
<tr>
  <td><code>buildDefaults</code></td>
  <td>Controls the default information for builds.<br><br><code>defaultProxy</code>: Contains the default proxy settings for all build operations, including image pull or push and source download.<br><br>You can override values by setting the <code>HTTP_PROXY</code>, <code>HTTPS_PROXY</code>, and <code>NO_PROXY</code> environment variables in the <code>BuildConfig</code> strategy.<br><br><code>gitProxy</code>: Contains the proxy settings for Git operations only. If set, this overrides any proxy settings for all Git commands, such as <code>git clone</code>.<br><br>Values that are not set here are inherited from DefaultProxy.<br><br><code>env</code>: A set of default environment variables that are applied to the build if the specified variables do not exist on the build.<br><br><code>imageLabels</code>: A list of labels that are applied to the resulting image. You can override a default label by providing a label with the same name in the <code>BuildConfig</code>.<br><br><code>resources</code>: Defines resource requirements to execute the build.</td>
</tr>
<tr>
  <td><code>ImageLabel</code></td>
  <td><code>name</code>: Defines the name of the label. It must have non-zero length.</td>
</tr>
<tr>
  <td><code>buildOverrides</code></td>
  <td>Controls override settings for builds.<br><br><code>imageLabels</code>: A list of labels that are applied to the resulting image. If you provided a label in the <code>BuildConfig</code> with the same name as one in this table, your label will be overwritten.<br><br><code>nodeSelector</code>: A selector which must be true for the build pod to fit on a node.<br><br><code>tolerations</code>: A list of tolerations that overrides any existing tolerations set on a build pod.</td>
</tr>
<tr>
  <td><code>BuildList</code></td>
  <td><code>items</code>: Standard object's metadata.</td>
</tr>
</tbody>
</table>

## Configuring build settings {#builds-configuration-file_build-configuration}

You can configure build settings by editing the `build.config.openshift.io/cluster` resource.

**Procedure**

- Edit the `build.config.openshift.io/cluster` resource by entering the following command:

  ```terminal
  $ oc edit build.config.openshift.io/cluster
  ```

  The following is an example `build.config.openshift.io/cluster` resource:

  ```yaml
  apiVersion: config.openshift.io/v1
  kind: Build (1)
  metadata:
    annotations:
      release.openshift.io/create-only: "true"
    creationTimestamp: "2019-05-17T13:44:26Z"
    generation: 2
    name: cluster
    resourceVersion: "107233"
    selfLink: /apis/config.openshift.io/v1/builds/cluster
    uid: e2e9cc14-78a9-11e9-b92b-06d6c7da38dc
  spec:
    buildDefaults: (2)
      defaultProxy: (3)
        httpProxy: http://proxy.com
        httpsProxy: https://proxy.com
        noProxy: internal.com
      env: (4)
      - name: envkey
        value: envvalue
      gitProxy: (5)
        httpProxy: http://gitproxy.com
        httpsProxy: https://gitproxy.com
        noProxy: internalgit.com
      imageLabels: (6)
      - name: labelkey
        value: labelvalue
      resources: (7)
        limits:
          cpu: 100m
          memory: 50Mi
        requests:
          cpu: 10m
          memory: 10Mi
    buildOverrides: (8)
      imageLabels: (9)
      - name: labelkey
        value: labelvalue
      nodeSelector: (10)
        selectorkey: selectorvalue
      tolerations: (11)
      - effect: NoSchedule
        key: node-role.kubernetes.io/builds
  operator: Exists
  ```

  1. `Build`: Holds cluster-wide information on how to handle builds. The canonical, and only valid name is `cluster`.
  2. `buildDefaults`: Controls the default information for builds.
  3. `defaultProxy`: Contains the default proxy settings for all build operations, including image pull or push and source download.
  4. `env`: A set of default environment variables that are applied to the build if the specified variables do not exist on the build.
  5. `gitProxy`: Contains the proxy settings for Git operations only. If set, this overrides any Proxy settings for all Git commands, such as `git clone`.
  6. `imageLabels`: A list of labels that are applied to the resulting image. You can override a default label by providing a label with the same name in the `BuildConfig`.
  7. `resources`: Defines resource requirements to execute the build.
  8. `buildOverrides`: Controls override settings for builds.
  9. `imageLabels`: A list of labels that are applied to the resulting image. If you provided a label in the `BuildConfig` with the same name as one in this table, your label will be overwritten.
  10. `nodeSelector`: A selector which must be true for the build pod to fit on a node.
  11. `tolerations`: A list of tolerations that overrides any existing tolerations set on a build pod.
