Description of problem: If setting BuildOverrides in inventory hosts file, BuildDefaults would be configured automatically in master-config.yaml. This is not what the users expected. Same results when configuring BuildDefaults only. Version-Release number of selected component (if applicable): openshift-ansible-3.5.1-1.git.0.e23e9bf.el7.noarch.rpm How reproducible: always Steps to Reproduce: 1.cat inventory_hosts <--snip--> openshift_buildoverrides_force_pull=true <--snip--> 2. Run BYO playbook 3. Actual results: # cat /etc/origin/master/master-config.yaml admissionConfig: pluginConfig: BuildDefaults: configuration: apiVersion: v1 env: - name: HTTP_PROXY value: '' - name: HTTPS_PROXY value: '' - name: NO_PROXY value: '' - name: http_proxy value: '' - name: https_proxy value: '' - name: no_proxy value: '' kind: BuildDefaultsConfig resources: limits: {} requests: {} BuildOverrides: configuration: apiVersion: v1 forcePull: 'true' kind: BuildOverridesConfig <--snip--> Expected results: Additional info: Same results when configuring BuildDefaults only. 1.cat inventory_hosts <--snip--> openshift_builddefaults_resources_requests_cpu=100m <--snip--> 2./etc/origin/master/master-config.yaml admissionConfig: pluginConfig: BuildDefaults: configuration: apiVersion: v1 env: - name: HTTP_PROXY value: '' - name: HTTPS_PROXY value: '' - name: NO_PROXY value: '' - name: http_proxy value: '' - name: https_proxy value: '' - name: no_proxy value: '' kind: BuildDefaultsConfig resources: limits: {} requests: cpu: 100m BuildOverrides: configuration: apiVersion: v1 kind: BuildOverridesConfig
Ben, Do you feel comfortable investigating this?
I'm going to have questions for you, but I can own it.
The behavior is not that setting one causes the other to be set, it's that both the defaults and overrides plugin configuration will *always* be set now, even if no explicit configuration values are provided. The plugin configuration that is generated in this case is the same as if no configuration was provided (all the values in the config represent the default behavior of the admission plugins). So this is working as designed. However I am going to try to cleanup the setting of the PROXY env variables. Although setting them to empty string doesn't hurt anything, it will be cleaner to not set them at all if the user did not provide a value.
https://github.com/openshift/openshift-ansible/pull/3158
Per comment 3, i've updated the behavior to not set the proxy env variables if no value is being supplied. The plugin configuration itself will remain, but again all the default/empty settings will have no effect.
Verified with version: openshift v3.5.0.14+20b49d0 kubernetes v1.5.2+43a9be4 etcd 3.1.0 After install with no BuildDefualts ansible items : admissionConfig: pluginConfig: BuildDefaults: configuration: apiVersion: v1 env: [] kind: BuildDefaultsConfig resources: limits: {} requests: {} BuildOverrides: configuration: annotations: annotationkey1: annotationvalue1 apiVersion: v1 forcePull: true imageLabels: - name: imagelabelname1 value: imagelabelvalue1 kind: BuildOverridesConfig nodeSelector: nodelabel1: nodelabelvalue1