mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-15 14:26:57 +00:00
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:
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user