이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 12. Build configuration resources


Use the following procedure to configure build settings.

12.1. Build controller configuration parameters

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

ParameterDescription

Build

Holds cluster-wide information on how to handle builds. The canonical, and only valid name is cluster.

spec: Holds user-settable values for the build controller configuration.

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.

You can override values by setting the HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables in the BuildConfig strategy.

gitProxy: Contains the proxy settings for Git operations only. If set, this overrides any proxy settings for all Git commands, such as git clone.

Values that are not set here are inherited from DefaultProxy.

env: A set of default environment variables that are applied to the build if the specified variables do not exist on the build.

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.

resources: Defines resource requirements to execute the build.

ImageLabel

name: Defines the name of the label. It must have non-zero length.

buildOverrides

Controls override settings for builds.

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.

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.

BuildList

items: Standard object’s metadata.

12.2. 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:

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

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

    apiVersion: config.openshift.io/v1
    kind: Build1
    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.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.