You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
upgradePlanCmd.Flags().StringVarP(&up.kubeconfig, "kubeconfig", "", "", "Path to the kubeconfig file to use for accessing the management cluster. If empty, default rules for kubeconfig discovery will be used")
67
+
68
+
upgradeCmd.AddCommand(upgradePlanCmd)
69
+
70
+
RootCmd.AddCommand(upgradeCmd)
71
+
}
72
+
73
+
funcrunUpgradePlan() error {
74
+
c, err:=client.New(cfgFile)
75
+
iferr!=nil {
76
+
returnerr
77
+
}
78
+
79
+
//TODO: switch to klog as soon as https://github.com/kubernetes-sigs/cluster-api/pull/2150 merge
80
+
fmt.Println("Checking new release availability...")
// ensure upgrade plans are sorted consistently (by CoreProvider.Namespace, ClusterAPIVersion).
89
+
sortUpgradePlans(upgradePlans)
90
+
91
+
iflen(upgradePlans) ==0 {
92
+
fmt.Println("There are no management groups in the cluster. Please use clusterctl init to initialize a Cluster API management cluster.")
93
+
returnnil
94
+
}
95
+
96
+
for_, plan:=rangeupgradePlans {
97
+
// ensure provider are sorted consistently (by Type, Name, Namespace).
98
+
sortUpgradeItems(plan)
99
+
100
+
upgradeAvailable:=false
101
+
102
+
fmt.Println("")
103
+
fmt.Printf("Management group: %s/%s, latest release available for the %s Cluster API version:\n", plan.CoreProvider.Namespace, plan.CoreProvider.Name, plan.ClusterAPIVersion)
0 commit comments