Adding additional printer columns (#40)

This commit is contained in:
Dario Tranchitella
2020-08-06 13:43:22 +02:00
committed by GitHub
parent a3c667b2b9
commit 941bddb81d
2 changed files with 11 additions and 1 deletions
+2
View File
@@ -53,6 +53,8 @@ type TenantStatus struct {
// +kubebuilder:resource:scope=Cluster
// +kubebuilder:printcolumn:name="Namespace quota",type="integer",JSONPath=".spec.namespaceQuota",description="The max amount of Namespaces can be created"
// +kubebuilder:printcolumn:name="Namespace count",type="integer",JSONPath=".status.size",description="The total amount of Namespaces in use"
// +kubebuilder:printcolumn:name="Owner",type="string",JSONPath=".spec.owner",description="The assigned Tenant owner"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Age"
// Tenant is the Schema for the tenants API
type Tenant struct {
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.5
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: tenants.capsule.clastix.io
spec:
@@ -17,6 +17,14 @@ spec:
description: The total amount of Namespaces in use
name: Namespace count
type: integer
- JSONPath: .spec.owner
description: The assigned Tenant owner
name: Owner
type: string
- JSONPath: .metadata.creationTimestamp
description: Age
name: Age
type: date
group: capsule.clastix.io
names:
kind: Tenant