Skip to content

Commit 027f4a8

Browse files
committed
Use control-plane in node selector instead of deprecated master
1 parent b910bb6 commit 027f4a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/cli/admin/mustgather/mustgather.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ func (o *MustGatherOptions) Run() error {
467467
}
468468
var hasMaster bool
469469
for _, node := range nodes.Items {
470-
if _, ok := node.Labels["node-role.kubernetes.io/master"]; ok {
470+
if _, ok := node.Labels["node-role.kubernetes.io/control-plane"]; ok {
471471
hasMaster = true
472472
break
473473
}
@@ -929,7 +929,7 @@ func (o *MustGatherOptions) newPod(node, image string, hasMaster bool) *corev1.P
929929
corev1.LabelOSStable: "linux",
930930
}
931931
if node == "" && hasMaster {
932-
nodeSelector["node-role.kubernetes.io/master"] = ""
932+
nodeSelector["node-role.kubernetes.io/control-plane"] = ""
933933
}
934934

935935
executedCommand := "/usr/bin/gather"

0 commit comments

Comments
 (0)