Add support for k8s 1.24+

This commit is contained in:
Ethan Mosbaugh
2022-05-24 11:05:59 -07:00
parent c31b803092
commit 74b4802b46
3 changed files with 13 additions and 0 deletions

View File

@@ -73,6 +73,9 @@ func ParseNodesForProviders(nodes []corev1.Node) (providers, string) {
if k == "node-role.kubernetes.io/master" {
foundMaster = true
}
if k == "node-role.kubernetes.io/control-plane" {
foundMaster = true
}
if k == "kubernetes.azure.com/role" {
foundProviders.aks = true
stringProvider = "aks"

View File

@@ -137,6 +137,11 @@ func copyFromHostCreateDaemonSet(ctx context.Context, client kubernetes.Interfac
Operator: "Exists",
Effect: "NoSchedule",
},
{
Key: "node-role.kubernetes.io/control-plane",
Operator: "Exists",
Effect: "NoSchedule",
},
},
Volumes: []corev1.Volume{
{

View File

@@ -69,6 +69,11 @@ func RunPodsReadyNodes(ctx context.Context, client v1.CoreV1Interface, opts RunP
Operator: "Exists",
Effect: "NoSchedule",
},
{
Key: "node-role.kubernetes.io/control-plane",
Operator: "Exists",
Effect: "NoSchedule",
},
},
},
}