Skip to content

Commit

Permalink
add control-plane label
Browse files Browse the repository at this point in the history
  • Loading branch information
whites11 committed Oct 28, 2022
1 parent 949d597 commit 8d54d35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Bump etcd to `3.5.5`.
- Bump `nginx-ingress-controller-app` to version `2.19.0`.
- [Azure] Bump `azuredisk-csi-driver-app` to version `v1.21.0-gs4`.
- Label master nodes with `node-role.kubernetes.io/control-plane` to comply with kubeadm/CAPI.

### Fixed

Expand Down
3 changes: 2 additions & 1 deletion templates/master.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,8 @@ systemd:
ExecStart=/bin/sh -c '\
while [ "$($KUBECTL get nodes $(hostname | tr '[:upper:]' '[:lower:]')| wc -l)" -lt "1" ]; do echo "Waiting for healthy k8s" && sleep 20s;done; \
$KUBECTL label nodes --overwrite $(hostname | tr '[:upper:]' '[:lower:]') node-role.kubernetes.io/master=""; \
$KUBECTL label nodes --overwrite $(hostname | tr '[:upper:]' '[:lower:]') kubernetes.io/role=master'
$KUBECTL label nodes --overwrite $(hostname | tr '[:upper:]' '[:lower:]') kubernetes.io/role=master; \
$KUBECTL label nodes --overwrite $(hostname | tr '[:upper:]' '[:lower:]') node-role.kubernetes.io/control-plane=""'
[Install]
WantedBy=multi-user.target
- name: api-certs.service
Expand Down

0 comments on commit 8d54d35

Please sign in to comment.