mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
Do not set CNI on a private master when enabling network policy.
This commit is contained in:
parent
3fd593aa2d
commit
00b62df554
@ -912,7 +912,11 @@ function start-kubelet {
|
||||
flags+=" --cni-bin-dir=/home/kubernetes/bin"
|
||||
if [[ "${NETWORK_POLICY_PROVIDER:-}" == "calico" ]]; then
|
||||
# Calico uses CNI always.
|
||||
flags+=" --network-plugin=cni"
|
||||
if [[ "${KUBERNETES_PRIVATE_MASTER:-}" == "true" ]]; then
|
||||
flags+=" --network-plugin=${NETWORK_PROVIDER}"
|
||||
else
|
||||
flags+=" --network-plugin=cni"
|
||||
fi
|
||||
else
|
||||
# Otherwise use the configured value.
|
||||
flags+=" --network-plugin=${NETWORK_PROVIDER}"
|
||||
|
Loading…
Reference in New Issue
Block a user