Skip to content

Commit

Permalink
Update install.sh to support new label. (#982)
Browse files Browse the repository at this point in the history
Signed-off-by: Syulin7 <[email protected]>
  • Loading branch information
Syulin7 committed Aug 28, 2023
1 parent de8cb95 commit 2029700
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions arena-artifacts/templates/binary-install-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,16 @@ spec:
- key: node-role.alibabacloud.com/addon
operator: Exists
effect: NoSchedule
nodeSelector:
node-role.kubernetes.io/master: ""
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
restartPolicy: Never
containers:
- name: installer
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ function install_binary_on_master() {
if [[ $INSTALL_BINARY_ON_MASTER != "true" ]];then
return
fi
master_count=$(arena-kubectl get nodes -l node-role.kubernetes.io/master | grep -v NAME | wc -l)
master_count=$(arena-kubectl get nodes --show-labels | grep -E 'node-role.kubernetes.io/master|node-role.kubernetes.io/control-plane' | wc -l)
master_count=$(echo $master_count)
export HELM_OPTIONS="$HELM_OPTIONS --set binary.enabled=true --set binary.masterCount=$master_count"
}
Expand Down

0 comments on commit 2029700

Please sign in to comment.