This repository was archived by the owner on Mar 9, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -147,12 +147,13 @@ config_path="${CONTAINERD_CONFIG_PATH:-"/etc/containerd/config.toml"}"
147147mkdir -p $( dirname ${config_path} )
148148cni_bin_dir=" ${CONTAINERD_HOME} /opt/cni/bin"
149149cni_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
156157fi
157158log_level=" ${CONTAINERD_LOG_LEVEL:- " info" } "
158159max_container_log_line=" ${CONTAINERD_MAX_CONTAINER_LOG_LINE:- 16384} "
You can’t perform that action at this time.
0 commit comments