Merge pull request #31486 from jlowdermilk/feature-gate-salt

Automatic merge from submit-queue

fix feature_gates salt plumbing

Fix salt plumbing for `--feature-gate` from `FEATURE_GATES kube env.

Was generating grains.conf and kube-env for master only. Verified it works now for gci and debian master/nodes.

cc @thockin @timstclair
This commit is contained in:
Kubernetes Submit Queue
2016-08-26 22:43:02 -07:00
committed by GitHub
2 changed files with 7 additions and 6 deletions

View File

@@ -638,6 +638,11 @@ EOF
if [ -n "${ENABLE_CUSTOM_METRICS:-}" ]; then
cat >>$file <<EOF
ENABLE_CUSTOM_METRICS: $(yaml-quote ${ENABLE_CUSTOM_METRICS})
EOF
fi
if [ -n "${FEATURE_GATES:-}" ]; then
cat >>$file <<EOF
FEATURE_GATES: $(yaml-quote ${FEATURE_GATES})
EOF
fi
if [[ "${master}" == "true" ]]; then
@@ -699,11 +704,7 @@ EOF
INITIAL_ETCD_CLUSTER: $(yaml-quote ${INITIAL_ETCD_CLUSTER})
EOF
fi
if [ -n "${FEATURE_GATES:-}" ]; then
cat >>$file <<EOF
FEATURE_GATES: $(yaml-quote ${FEATURE_GATES})
EOF
fi
else
# Node-only env vars.
cat >>$file <<EOF

View File

@@ -960,7 +960,6 @@ EOF
fi
env-to-grains "runtime_config"
env-to-grains "feature_gates"
env-to-grains "kube_user"
}
@@ -1004,6 +1003,7 @@ function salt-grains() {
env-to-grains "docker_opts"
env-to-grains "docker_root"
env-to-grains "kubelet_root"
env-to-grains "feature_gates"
}
function configure-salt() {