Build configuration resources

    The resource offers the following configuration parameters.

    Configuring build settings

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

    Procedure

    • Edit the build.config.openshift.io/cluster resource:

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

      1. apiVersion: config.openshift.io/v1
      2. metadata:
      3. annotations:
      4. release.openshift.io/create-only: "true"
      5. creationTimestamp: "2019-05-17T13:44:26Z"
      6. generation: 2
      7. name: cluster
      8. resourceVersion: "107233"
      9. selfLink: /apis/config.openshift.io/v1/builds/cluster
      10. uid: e2e9cc14-78a9-11e9-b92b-06d6c7da38dc
      11. spec:
      12. defaultProxy:(3)
      13. httpProxy: http://proxy.com
      14. httpsProxy: https://proxy.com
      15. noProxy: internal.com
      16. env:(4)
      17. - name: envkey
      18. value: envvalue
      19. gitProxy:(5)
      20. httpProxy: http://gitproxy.com
      21. httpsProxy: https://gitproxy.com
      22. noProxy: internalgit.com
      23. imageLabels:(6)
      24. - name: labelkey
      25. value: labelvalue
      26. resources:(7)
      27. cpu: 100m
      28. requests:
      29. cpu: 10m
      30. memory: 10Mi
      31. buildOverrides:(8)
      32. imageLabels:(9)
      33. - name: labelkey
      34. value: labelvalue
      35. nodeSelector:(10)
      36. selectorkey: selectorvalue
      37. tolerations:(11)
      38. - effect: NoSchedule
      39. key: node-role.kubernetes.io/builds
      40. operator: Exists
      1Build: Holds cluster-wide information on how to handle builds. The canonical, and only valid name is cluster.
      2buildDefaults: Controls the default information for builds.
      3defaultProxy: Contains the default proxy settings for all build operations, including image pull or push and source download.
      4env: A set of default environment variables that are applied to the build if the specified variables do not exist on the build.
      5gitProxy: Contains the proxy settings for Git operations only. If set, this overrides any Proxy settings for all Git commands, such as git clone.
      6imageLabels: 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.
      7resources: Defines resource requirements to execute the build.
      8buildOverrides: Controls override settings for builds.
      9imageLabels: 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.
      10nodeSelector: A selector which must be true for the build pod to fit on a node.
      11tolerations: A list of tolerations that overrides any existing tolerations set on a build pod.