controller: should always set default version
We forget to set default version in finding existing clusters
@@ -185,6 +185,10 @@ func (c *Controller) findAllClusters() (string, error) {
}
for _, item := range clusterList.Items {
+ if s := item.Spec; len(s.Version) == 0 {
+ // TODO: set version in spec in apiserver
+ s.Version = defaultVersion
+ }
clusterName := item.Name
stopC := make(chan struct{})
nc := cluster.New(c.makeClusterConfig(), &item, stopC, &c.waitCluster)
