Adds --network-plugin-dir argument to hack/local-up-cluster.sh
to allow local deploys to specify cni plugin directory.
This commit is contained in:
		@@ -25,6 +25,7 @@ ALLOW_PRIVILEGED=${ALLOW_PRIVILEGED:-""}
 | 
				
			|||||||
ALLOW_SECURITY_CONTEXT=${ALLOW_SECURITY_CONTEXT:-""}
 | 
					ALLOW_SECURITY_CONTEXT=${ALLOW_SECURITY_CONTEXT:-""}
 | 
				
			||||||
RUNTIME_CONFIG=${RUNTIME_CONFIG:-""}
 | 
					RUNTIME_CONFIG=${RUNTIME_CONFIG:-""}
 | 
				
			||||||
NET_PLUGIN=${NET_PLUGIN:-""}
 | 
					NET_PLUGIN=${NET_PLUGIN:-""}
 | 
				
			||||||
 | 
					NET_PLUGIN_DIR=${NET_PLUGIN_DIR:-""}
 | 
				
			||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
 | 
					KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
 | 
				
			||||||
# We disable cluster DNS by default because this script uses docker0 (or whatever
 | 
					# We disable cluster DNS by default because this script uses docker0 (or whatever
 | 
				
			||||||
# container bridge docker is currently using) and we don't know the IP of the
 | 
					# container bridge docker is currently using) and we don't know the IP of the
 | 
				
			||||||
@@ -326,6 +327,11 @@ function start_kubelet {
 | 
				
			|||||||
        net_plugin_args="--network-plugin=${NET_PLUGIN}"
 | 
					        net_plugin_args="--network-plugin=${NET_PLUGIN}"
 | 
				
			||||||
      fi
 | 
					      fi
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
 | 
					      net_plugin_dir_args=""
 | 
				
			||||||
 | 
					      if [[ -n "${NET_PLUGIN_DIR}" ]]; then
 | 
				
			||||||
 | 
					        net_plugin_dir_args="--network-plugin-dir=${NET_PLUGIN_DIR}"
 | 
				
			||||||
 | 
					      fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      kubenet_plugin_args=""
 | 
					      kubenet_plugin_args=""
 | 
				
			||||||
      if [[ "${NET_PLUGIN}" == "kubenet" ]]; then
 | 
					      if [[ "${NET_PLUGIN}" == "kubenet" ]]; then
 | 
				
			||||||
        kubenet_plugin_args="--reconcile-cidr=true "
 | 
					        kubenet_plugin_args="--reconcile-cidr=true "
 | 
				
			||||||
@@ -342,6 +348,7 @@ function start_kubelet {
 | 
				
			|||||||
        --api-servers="${API_HOST}:${API_PORT}" \
 | 
					        --api-servers="${API_HOST}:${API_PORT}" \
 | 
				
			||||||
        --cpu-cfs-quota=${CPU_CFS_QUOTA} \
 | 
					        --cpu-cfs-quota=${CPU_CFS_QUOTA} \
 | 
				
			||||||
        ${dns_args} \
 | 
					        ${dns_args} \
 | 
				
			||||||
 | 
					        ${net_plugin_dir_args} \
 | 
				
			||||||
        ${net_plugin_args} \
 | 
					        ${net_plugin_args} \
 | 
				
			||||||
        ${kubenet_plugin_args} \
 | 
					        ${kubenet_plugin_args} \
 | 
				
			||||||
        --port="$KUBELET_PORT" >"${KUBELET_LOG}" 2>&1 &
 | 
					        --port="$KUBELET_PORT" >"${KUBELET_LOG}" 2>&1 &
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user