when get CRD resources with --server-print=true

the output looks like:

	NAMESPACE   NAME   CREATED AT
	default     test       2m

	Notice that the column CREATED AT 2m makes no sense.
	The correct column name here should be AGE.
	Which keeps the same with the situation when --server-print=false

	This patch fix this.
This commit is contained in:
WanLinghao 2018-04-12 14:56:41 +08:00
parent dcc6d78ac0
commit c86eff176c

View File

@ -42,7 +42,7 @@ var swaggerMetadataDescriptions = metav1.ObjectMeta{}.SwaggerDoc()
func New(extensions spec.Extensions) (rest.TableConvertor, error) {
headers := []metav1beta1.TableColumnDefinition{
{Name: "Name", Type: "string", Format: "name", Description: swaggerMetadataDescriptions["name"]},
{Name: "Created At", Type: "date", Description: swaggerMetadataDescriptions["creationTimestamp"]},
{Name: "Age", Type: "date", Description: swaggerMetadataDescriptions["creationTimestamp"]},
}
c := &convertor{
headers: headers,