Skip to content

Commit d0db6b9

Browse files
committed
backport Age column for osc/osm
Signed-off-by: Mario Constanti <[email protected]>
1 parent 6a502f1 commit d0db6b9

8 files changed

+30
-0
lines changed

api/v1alpha3/openstackcluster_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ type OpenStackClusterStatus struct {
152152
// +kubebuilder:printcolumn:name="Subnet",type="string",JSONPath=".status.network.subnet.id",description="Subnet the cluster is using"
153153
// +kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".spec.controlPlaneEndpoint.host",description="API Endpoint",priority=1
154154
// +kubebuilder:printcolumn:name="Bastion",type="string",JSONPath=".status.bastion.floatingIP",description="Bastion floating IP"
155+
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of OpenStackCluster"
155156

156157
// OpenStackCluster is the Schema for the openstackclusters API.
157158
type OpenStackCluster struct {

api/v1alpha3/openstackmachine_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ type OpenStackMachineStatus struct {
135135
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Machine ready status"
136136
// +kubebuilder:printcolumn:name="ProviderID",type="string",JSONPath=".spec.providerID",description="OpenStack instance ID"
137137
// +kubebuilder:printcolumn:name="Machine",type="string",JSONPath=".metadata.ownerReferences[?(@.kind==\"Machine\")].name",description="Machine object which owns with this OpenStackMachine"
138+
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of OpenStackMachine"
138139

139140
// OpenStackMachine is the Schema for the openstackmachines API.
140141
type OpenStackMachine struct {

api/v1alpha4/openstackcluster_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ type OpenStackClusterStatus struct {
217217
// +kubebuilder:printcolumn:name="Subnet",type="string",JSONPath=".status.network.subnet.id",description="Subnet the cluster is using"
218218
// +kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".spec.controlPlaneEndpoint.host",description="API Endpoint",priority=1
219219
// +kubebuilder:printcolumn:name="Bastion IP",type="string",JSONPath=".status.bastion.floatingIP",description="Bastion address for breakglass access"
220+
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of OpenStackCluster"
220221

221222
// OpenStackCluster is the Schema for the openstackclusters API.
222223
type OpenStackCluster struct {

api/v1alpha4/openstackmachine_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ type OpenStackMachineStatus struct {
135135
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Machine ready status"
136136
// +kubebuilder:printcolumn:name="ProviderID",type="string",JSONPath=".spec.providerID",description="OpenStack instance ID"
137137
// +kubebuilder:printcolumn:name="Machine",type="string",JSONPath=".metadata.ownerReferences[?(@.kind==\"Machine\")].name",description="Machine object which owns with this OpenStackMachine"
138+
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of OpenStackMachine"
138139

139140
// OpenStackMachine is the Schema for the openstackmachines API.
140141
type OpenStackMachine struct {

api/v1alpha5/openstackcluster_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ type OpenStackClusterStatus struct {
214214
// +kubebuilder:printcolumn:name="Subnet",type="string",JSONPath=".status.network.subnet.id",description="Subnet the cluster is using"
215215
// +kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".spec.controlPlaneEndpoint.host",description="API Endpoint",priority=1
216216
// +kubebuilder:printcolumn:name="Bastion IP",type="string",JSONPath=".status.bastion.floatingIP",description="Bastion address for breakglass access"
217+
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of OpenStackCluster"
217218

218219
// OpenStackCluster is the Schema for the openstackclusters API.
219220
type OpenStackCluster struct {

api/v1alpha5/openstackmachine_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ type OpenStackMachineStatus struct {
139139
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Machine ready status"
140140
// +kubebuilder:printcolumn:name="ProviderID",type="string",JSONPath=".spec.providerID",description="OpenStack instance ID"
141141
// +kubebuilder:printcolumn:name="Machine",type="string",JSONPath=".metadata.ownerReferences[?(@.kind==\"Machine\")].name",description="Machine object which owns with this OpenStackMachine"
142+
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of OpenStackMachine"
142143

143144
// OpenStackMachine is the Schema for the openstackmachines API.
144145
type OpenStackMachine struct {

config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ spec:
4646
jsonPath: .status.bastion.floatingIP
4747
name: Bastion
4848
type: string
49+
- description: Time duration since creation of OpenStackCluster
50+
jsonPath: .metadata.creationTimestamp
51+
name: Age
52+
type: date
4953
name: v1alpha3
5054
schema:
5155
openAPIV3Schema:
@@ -1055,6 +1059,10 @@ spec:
10551059
jsonPath: .status.bastion.floatingIP
10561060
name: Bastion IP
10571061
type: string
1062+
- description: Time duration since creation of OpenStackCluster
1063+
jsonPath: .metadata.creationTimestamp
1064+
name: Age
1065+
type: date
10581066
name: v1alpha4
10591067
schema:
10601068
openAPIV3Schema:
@@ -2462,6 +2470,10 @@ spec:
24622470
jsonPath: .status.bastion.floatingIP
24632471
name: Bastion IP
24642472
type: string
2473+
- description: Time duration since creation of OpenStackCluster
2474+
jsonPath: .metadata.creationTimestamp
2475+
name: Age
2476+
type: date
24652477
name: v1alpha5
24662478
schema:
24672479
openAPIV3Schema:

config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ spec:
4141
jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name
4242
name: Machine
4343
type: string
44+
- description: Time duration since creation of OpenStackMachine
45+
jsonPath: .metadata.creationTimestamp
46+
name: Age
47+
type: date
4448
name: v1alpha3
4549
schema:
4650
openAPIV3Schema:
@@ -376,6 +380,10 @@ spec:
376380
jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name
377381
name: Machine
378382
type: string
383+
- description: Time duration since creation of OpenStackMachine
384+
jsonPath: .metadata.creationTimestamp
385+
name: Age
386+
type: date
379387
name: v1alpha4
380388
schema:
381389
openAPIV3Schema:
@@ -792,6 +800,10 @@ spec:
792800
jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name
793801
name: Machine
794802
type: string
803+
- description: Time duration since creation of OpenStackMachine
804+
jsonPath: .metadata.creationTimestamp
805+
name: Age
806+
type: date
795807
name: v1alpha5
796808
schema:
797809
openAPIV3Schema:

0 commit comments

Comments
 (0)