Skip to content

Commit

Permalink
Add additional printer columns for kubectl
Browse files Browse the repository at this point in the history
  • Loading branch information
I308301 committed Mar 5, 2020
1 parent b33993d commit fbacbe2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/v1alpha1/etcd_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ type EtcdStatus struct {

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.ready`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.labelSelector

// Etcd is the Schema for the etcds API
Expand Down
7 changes: 7 additions & 0 deletions config/crd/bases/druid.gardener.cloud_etcds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ metadata:
creationTimestamp: null
name: etcds.druid.gardener.cloud
spec:
additionalPrinterColumns:
- JSONPath: .status.ready
name: Ready
type: string
- JSONPath: .metadata.creationTimestamp
name: Age
type: date
group: druid.gardener.cloud
names:
kind: Etcd
Expand Down

0 comments on commit fbacbe2

Please sign in to comment.