31.3.2. 手动设置全局构建覆盖
配置 BuildOverrides
插件:
在 master 上的 /etc/origin/master/master-config.yaml 文件中为它添加配置:
admissionConfig: pluginConfig: BuildOverrides: configuration: apiVersion: v1 kind: BuildOverridesConfig forcePull: true 1 imageLabels: - name: distribution-scope 2 value: private nodeSelector: 3 key1: value1 key2: value2 annotations: 4 key1: value1 key2: value2 tolerations: 5 - key: mykey1 value: myvalue1 effect: NoSchedule operator: Equal - key: mykey2 value: myvalue2 effect: NoExecute operator: Equal
注意您必须使用
BuildOverrides
节点选择器来使用BuildOverrides
插件覆盖容限。重启 master 服务以使更改生效:
# master-restart api # master-restart controllers