Skip to content

Commit

Permalink
Legacy control plane node labels are no longer used
Browse files Browse the repository at this point in the history
  • Loading branch information
johngmyers committed Sep 5, 2023
1 parent efab9bc commit 2add4c7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/kops-controller/controllers/legacy_node_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (r *LegacyNodeReconciler) Reconcile(ctx context.Context, req ctrl.Request)
for k := range node.Labels {
// If it is one of our managed labels, "prune" values we don't want to be there
switch k {
case nodelabels.RoleLabelMaster16, nodelabels.RoleLabelAPIServer16, nodelabels.RoleLabelNode16, nodelabels.RoleLabelControlPlane20:
case nodelabels.RoleLabelAPIServer16, nodelabels.RoleLabelNode16, nodelabels.RoleLabelControlPlane20:
if _, found := labels[k]; !found {
deleteLabels[k] = struct{}{}
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/kops-controller/controllers/node_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (r *NodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.
for k := range node.Labels {
// If it is one of our managed labels, "prune" values we don't want to be there
switch k {
case nodelabels.RoleLabelMaster16, nodelabels.RoleLabelAPIServer16, nodelabels.RoleLabelNode16, nodelabels.RoleLabelControlPlane20:
case nodelabels.RoleLabelAPIServer16, nodelabels.RoleLabelNode16, nodelabels.RoleLabelControlPlane20:
if _, found := labels[k]; !found {
deleteLabels[k] = struct{}{}
}
Expand Down
1 change: 0 additions & 1 deletion pkg/nodelabels/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
)

const (
RoleLabelMaster16 = "node-role.kubernetes.io/master"
RoleLabelAPIServer16 = "node-role.kubernetes.io/api-server"
RoleLabelNode16 = "node-role.kubernetes.io/node"

Expand Down

0 comments on commit 2add4c7

Please sign in to comment.