Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit d1dcacf

Browse files
committed
Support netd in GCE bootstrap.
Signed-off-by: Lantao Liu <[email protected]>
1 parent 2be13a8 commit d1dcacf

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

cluster/gce/configure.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,13 @@ config_path="${CONTAINERD_CONFIG_PATH:-"/etc/containerd/config.toml"}"
147147
mkdir -p $(dirname ${config_path})
148148
cni_bin_dir="${CONTAINERD_HOME}/opt/cni/bin"
149149
cni_template_path="${CONTAINERD_HOME}/opt/containerd/cluster/gce/cni.template"
150-
# NETWORK_POLICY_PROVIDER is from kube-env.
151-
network_policy_provider="${NETWORK_POLICY_PROVIDER:-"none"}"
152-
if [ -n "${network_policy_provider}" ] && [ "${network_policy_provider}" != "none" ] && [ "${KUBERNETES_MASTER:-}" != "true" ]; then
153-
# Use Kubernetes cni daemonset on node if network policy provider is specified.
154-
cni_bin_dir="${KUBE_HOME}/bin"
155-
cni_template_path=""
150+
if [ "${KUBERNETES_MASTER:-}" != "true" ]; then
151+
if [ "${NETWORK_POLICY_PROVIDER:-"none"}" != "none" ] || [ "${ENABLE_NETD:-}" == "true" ]; then
152+
# Use Kubernetes cni daemonset on node if network policy provider is specified
153+
# or netd is enabled.
154+
cni_bin_dir="${KUBE_HOME}/bin"
155+
cni_template_path=""
156+
fi
156157
fi
157158
log_level="${CONTAINERD_LOG_LEVEL:-"info"}"
158159
max_container_log_line="${CONTAINERD_MAX_CONTAINER_LOG_LINE:-16384}"

0 commit comments

Comments
 (0)