Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
crds: include "Age" when printing releases (#103)
Browse files Browse the repository at this point in the history
In PR #80, we tried to make the output of `kubectl get release` more
useful by including additional columns. Unfortunately, we nuked the
"Age" column when we didn't want to. As users use that to find out
what's the latest release for an application, we ended up making the
output *less* useful.

It turns out that, when adding additional columns, they replace *all*
the previously available columns (in this case, just the age).
Explicitly including it fixes the problem.
  • Loading branch information
juliogreff authored and Oleg Sidorov committed Jun 12, 2019
1 parent 171b770 commit 266f284
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crd/Release-crd.yaml
Expand Up @@ -15,6 +15,10 @@ spec:
description: The current achieved step for a release as defined in the rollout strategy.
name: Step
type: string
- JSONPath: .metadata.creationTimestamp
description: The release's age.
name: Age
type: date
# group name to use for REST API: /apis/<group>/<version>
group: shipper.booking.com
# version name to use for REST API: /apis/<group>/<version>
Expand Down
6 changes: 6 additions & 0 deletions pkg/crds/release.go
Expand Up @@ -58,6 +58,12 @@ var Release = &apiextensionv1beta1.CustomResourceDefinition{
Description: "The current achieved step for a release as defined in the rollout strategy.",
JSONPath: ".status.achievedStep.name",
},
apiextensionv1beta1.CustomResourceColumnDefinition{
Name: "Age",
Type: "date",
Description: "The release's age.",
JSONPath: ".metadata.creationTimestamp",
},
},
},
}

0 comments on commit 266f284

Please sign in to comment.