Build configuration resources
Use the following procedure to configure build settings.
Build controller configuration parameters
The build.config.openshift.io/cluster resource offers the following configuration parameters.
| Parameter | Description |
|---|---|
|
Holds cluster-wide information on how to handle builds. The canonical, and only valid name is
|
|
Controls the default information for builds.
You can override values by setting the
Values that are not set here are inherited from DefaultProxy.
|
|
|
|
Controls override settings for builds.
|
|
|
Configuring build settings
You can configure build settings by editing the build.config.openshift.io/cluster resource.
-
Edit the
build.config.openshift.io/clusterresource by entering the following command:$ oc edit build.config.openshift.io/clusterThe following is an example
build.config.openshift.io/clusterresource:apiVersion: config.openshift.io/v1 kind: Build 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: defaultProxy: httpProxy: http://proxy.com httpsProxy: https://proxy.com noProxy: internal.com env: - name: envkey value: envvalue gitProxy: httpProxy: http://gitproxy.com httpsProxy: https://gitproxy.com noProxy: internalgit.com imageLabels: - name: labelkey value: labelvalue resources: limits: cpu: 100m memory: 50Mi requests: cpu: 10m memory: 10Mi buildOverrides: imageLabels: - name: labelkey value: labelvalue nodeSelector: selectorkey: selectorvalue tolerations: - effect: NoSchedule key: node-role.kubernetes.io/builds operator: ExistsBuild: Holds cluster-wide information on how to handle builds. The canonical, and only valid name iscluster.buildDefaults: Controls the default information for builds.defaultProxy: Contains the default proxy settings for all build operations, including image pull or push and source download.env: A set of default environment variables that are applied to the build if the specified variables do not exist on the build.gitProxy: Contains the proxy settings for Git operations only. If set, this overrides any Proxy settings for all Git commands, such asgit clone.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 theBuildConfig.resources: Defines resource requirements to execute the build.buildOverrides: Controls override settings for builds.imageLabels: A list of labels that are applied to the resulting image. If you provided a label in theBuildConfigwith the same name as one in this table, your label will be overwritten.nodeSelector: A selector which must be true for the build pod to fit on a node.tolerations: A list of tolerations that overrides any existing tolerations set on a build pod.