mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 10:19:50 +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"
|
flags+=" --cni-bin-dir=/home/kubernetes/bin"
|
||||||
if [[ "${NETWORK_POLICY_PROVIDER:-}" == "calico" ]]; then
|
if [[ "${NETWORK_POLICY_PROVIDER:-}" == "calico" ]]; then
|
||||||
# Calico uses CNI always.
|
# 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
|
else
|
||||||
# Otherwise use the configured value.
|
# Otherwise use the configured value.
|
||||||
flags+=" --network-plugin=${NETWORK_PROVIDER}"
|
flags+=" --network-plugin=${NETWORK_PROVIDER}"
|
||||||
|
Loading…
Reference in New Issue
Block a user