diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index 94e88d5a373..5e0604a5849 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -212,6 +212,16 @@ NODE_LABELS="${KUBE_NODE_LABELS:-beta.kubernetes.io/fluentd-ds-ready=true}" # NON_MASTER_NODE_LABELS are labels will only be applied on non-master nodes. NON_MASTER_NODE_LABELS="${KUBE_NON_MASTER_NODE_LABELS:-}" +# Optional: Enable netd. +ENABLE_NETD="${KUBE_ENABLE_NETD:-false}" +CUSTOM_NETD_YAML="${KUBE_CUSTOM_NETD_YAML:-}" + +# To avoid running netd on a node that is not configured appropriately, +# label each Node so that the DaemonSet can run the Pods only on ready Nodes. +if [[ ${ENABLE_NETD:-} == "true" ]]; then + NON_MASTER_NODE_LABELS="${NON_MASTER_NODE_LABELS:+${NON_MASTER_NODE_LABELS},}beta.kubernetes.io/kube-netd-ready=true" +fi + # To avoid running Calico on a node that is not configured appropriately, # label each Node so that the DaemonSet can run the Pods only on ready Nodes. if [[ ${NETWORK_POLICY_PROVIDER:-} == "calico" ]]; then @@ -359,10 +369,6 @@ STORAGE_MEDIA_TYPE=${STORAGE_MEDIA_TYPE:-} NETWORK_PROVIDER="${NETWORK_PROVIDER:-kubenet}" # none, kubenet -# Optional: Enable netd. -ENABLE_NETD="${KUBE_ENABLE_NETD:-false}" -CUSTOM_NETD_YAML="${KUBE_CUSTOM_NETD_YAML:-}" - # Network Policy plugin specific settings. NETWORK_POLICY_PROVIDER="${NETWORK_POLICY_PROVIDER:-none}" # calico