Restore legacy master role for etcd nodes

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/2714/head
Brad Davidson 4 years ago committed by Brad Davidson
parent 13d585059f
commit 8e4d3e645b

@ -13,6 +13,7 @@ import (
const ( const (
nodeID = "etcd.k3s.cattle.io/node-name" nodeID = "etcd.k3s.cattle.io/node-name"
nodeAddress = "etcd.k3s.cattle.io/node-address" nodeAddress = "etcd.k3s.cattle.io/node-address"
master = "node-role.kubernetes.io/master"
controlPlane = "node-role.kubernetes.io/control-plane" controlPlane = "node-role.kubernetes.io/control-plane"
etcdRole = "node-role.kubernetes.io/etcd" etcdRole = "node-role.kubernetes.io/etcd"
) )
@ -69,6 +70,7 @@ func (h *handler) handleSelf(node *v1.Node) (*v1.Node, error) {
node.Annotations[nodeID] = h.etcd.name node.Annotations[nodeID] = h.etcd.name
node.Annotations[nodeAddress] = h.etcd.address node.Annotations[nodeAddress] = h.etcd.address
node.Labels[etcdRole] = "true" node.Labels[etcdRole] = "true"
node.Labels[master] = "true"
node.Labels[controlPlane] = "true" node.Labels[controlPlane] = "true"
return h.nodeController.Update(node) return h.nodeController.Update(node)

Loading…
Cancel
Save