kubernetes-retired / cluster-registry

[EOL] Cluster Registry API
https://kubernetes.github.io/cluster-registry/
Apache License 2.0
238 stars 88 forks source link

Ensure `kubectl explain clusters` has meaningful output #211

Closed pmorie closed 6 years ago

pmorie commented 6 years ago

This issue is to ensure that kubectl explain cluster has meaningful output; requires some of the same bits as #210

/sig multicluster

cc @onyiny-ang

onyiny-ang commented 6 years ago

Using kubectl compiled from master and with the changes (and cluster-registry image created from file changes in #213) kubectl explain clusters has the following output:

KIND:     Cluster
VERSION:  clusterregistry.k8s.io/v1alpha1

DESCRIPTION:
     Cluster contains information about a cluster in a cluster registry.

FIELDS:
   apiVersion   <string>
     APIVersion defines the versioned schema of this representation of an
     object. Servers should convert recognized schemas to the latest internal
     value, and may reject unrecognized values. More info:
     https://git.k8s.io/community/contributors/devel/api-conventions.md#resources

   kind <string>
     Kind is a string value representing the REST resource this object
     represents. Servers may infer this from the endpoint the client submits
     requests to. Cannot be updated. In CamelCase. More info:
     https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

   metadata <Object>
     Standard object's metadata. More info:
     https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata

   spec <Object>
     Spec is the specification of the cluster. This may or may not be reconciled
     by an active controller.

   status   <>
     Status is the status of the cluster. It is optional, and can be left nil to
     imply that the cluster status is not being reported.

Is this meaningful? Or is there information that should or should not be there?

pmorie commented 6 years ago

That's promising - what does kubectl explain cluster.spec show?

onyiny-ang commented 6 years ago
KIND:     Cluster
VERSION:  clusterregistry.k8s.io/v1alpha1

RESOURCE: spec <Object>

DESCRIPTION:
     Spec is the specification of the cluster. This may or may not be reconciled
     by an active controller.

     ClusterSpec contains the specification of a cluster.

FIELDS:
   authInfo <Object>
     AuthInfo contains public information that can be used to authenticate to
     and authorize with this cluster. It is not meant to store private
     information (e.g., tokens or client certificates) and cluster registry
     implementations are not expected to provide hardened storage for secrets.

   kubernetesApiEndpoints   <Object>
     KubernetesAPIEndpoints represents the endpoints of the API server for this
     cluster.
pmorie commented 6 years ago

Excellent - seems like we can close this issue out then!