1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-01 15:06:23 +00:00

Merge pull request #1539 from superseb/fixcalicolabels

Use correct labels to delete calico pods
This commit is contained in:
Dan Ramich
2019-08-14 10:15:58 -07:00
committed by GitHub
2 changed files with 11 additions and 5 deletions

View File

@@ -497,10 +497,9 @@ func RestartClusterPods(ctx context.Context, kubeCluster *Cluster) error {
return fmt.Errorf("Failed to initialize new kubernetes client: %v", err)
}
labelsList := []string{
fmt.Sprintf("%s=%s", KubeAppLabel, CalicoNetworkPlugin),
fmt.Sprintf("%s=%s", KubeAppLabel, FlannelNetworkPlugin),
fmt.Sprintf("%s=%s", KubeAppLabel, CanalNetworkPlugin),
fmt.Sprintf("%s=%s", NameLabel, WeaveNetowrkAppName),
fmt.Sprintf("%s=%s", NameLabel, WeaveNetworkAppName),
fmt.Sprintf("%s=%s", AppLabel, NginxIngressAddonAppName),
fmt.Sprintf("%s=%s", KubeAppLabel, DefaultMonitoringProvider),
fmt.Sprintf("%s=%s", KubeAppLabel, KubeDNSAddonAppName),
@@ -509,6 +508,9 @@ func RestartClusterPods(ctx context.Context, kubeCluster *Cluster) error {
fmt.Sprintf("%s=%s", AppLabel, KubeAPIAuthAppName),
fmt.Sprintf("%s=%s", AppLabel, CattleClusterAgentAppName),
}
for _, calicoLabel := range CalicoNetworkLabels {
labelsList = append(labelsList, fmt.Sprintf("%s=%s", KubeAppLabel, calicoLabel))
}
var errgrp errgroup.Group
labelQueue := util.GetObjectQueue(labelsList)
for w := 0; w < services.WorkerThreads; w++ {