Merge pull request #28186 from nikhiljindal/betaAPI

Automatic merge from submit-queue

federation: Upgrading the groupversion to v1beta1

This PR contains 2 commits:
* Removing fields from Cluster API object that we are not using. This includes: Capacity, Allocatable and ClusterMeta.
* Move code and rename groupversion `federation/v1alpha1` to `federation/v1beta1`


cc @kubernetes/sig-cluster-federation
This commit is contained in:
k8s-merge-robot
2016-06-28 19:05:00 -07:00
committed by GitHub
48 changed files with 606 additions and 1879 deletions

View File

@@ -2116,22 +2116,6 @@ func describeCluster(cluster *federation.Cluster) (string, error) {
c.Message)
}
}
fmt.Fprintf(out, "Version:\t%s\n", cluster.Status.Version)
if len(cluster.Status.Capacity) > 0 {
fmt.Fprintf(out, "Capacity:\n")
for resource, value := range cluster.Status.Capacity {
fmt.Fprintf(out, " %s:\t%s\n", resource, value.String())
}
}
if len(cluster.Status.Allocatable) > 0 {
fmt.Fprintf(out, "Allocatable:\n")
for resource, value := range cluster.Status.Allocatable {
fmt.Fprintf(out, " %s:\t%s\n", resource, value.String())
}
}
return nil
})
}

View File

@@ -568,7 +568,7 @@ func TestDescribeCluster(t *testing.T) {
if err != nil {
t.Errorf("unexpected error: %v", err)
}
if !strings.Contains(out, "foo") || !strings.Contains(out, "Version:") {
if !strings.Contains(out, "foo") {
t.Errorf("unexpected out: %s", out)
}
}

View File

@@ -863,10 +863,9 @@ func printCluster(c *federation.Cluster, w io.Writer, options PrintOptions) erro
statuses = append(statuses, "Unknown")
}
if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\n",
if _, err := fmt.Fprintf(w, "%s\t%s\t%s\n",
c.Name,
strings.Join(statuses, ","),
c.Status.Version,
translateTimestamp(c.CreationTimestamp),
); err != nil {
return err