Skip to content

Commit

Permalink
fix: move away words that is considered offensive after k8s v1.20.0 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
zbb88888 authored Jul 13, 2022
1 parent 76edad0 commit a38dbb5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dist/images/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ if [[ $ENABLE_SSL = "true" ]];then
fi

echo "[Step 1/6] Label kube-ovn-master node and label datapath type"

# Kubernetes project moved away words that is considered offensive after v1.20.0
KUBERNETES_SERVER_VERSION=$(kubectl version --short | grep "Server Version" | cut -d ":" -f 2 | cut -d "v" -f 2)
if [ "$KUBERNETES_SERVER_VERSION" \> "1.20.0" ]; then
LABEL="node-role.kubernetes.io/control-plane"
fi

count=$(kubectl get no -l$LABEL --no-headers -o wide | wc -l | sed 's/ //g')
if [ "$count" = "0" ]; then
echo "ERROR: No node with label $LABEL"
Expand Down

0 comments on commit a38dbb5

Please sign in to comment.