Skip to content

Commit aedbb03

Browse files
authored
Merge pull request #930 from lukas8219/5411-crd-fields
Add better kubectl columns to ImageUpdateAutomation
2 parents b3b4776 + ad9486e commit aedbb03

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

api/v1beta2/imageupdateautomation_types.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,11 @@ type ObservedPolicies map[string]ImageRef
132132
//+kubebuilder:storageversion
133133
//+kubebuilder:object:root=true
134134
//+kubebuilder:subresource:status
135-
//+kubebuilder:printcolumn:name="Last run",type=string,JSONPath=`.status.lastAutomationRunTime`
136135
//+kubebuilder:resource:shortName=iua;imgupd;imgauto
136+
//+kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",description=""
137+
//+kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].message",description=""
138+
//+kubebuilder:printcolumn:name="Last run",type="string",JSONPath=".status.lastAutomationRunTime",priority=1
139+
//+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""
137140

138141
// ImageUpdateAutomation is the Schema for the imageupdateautomations API
139142
type ImageUpdateAutomation struct {

config/crd/bases/image.toolkit.fluxcd.io_imageupdateautomations.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,19 @@ spec:
332332
subresources:
333333
status: {}
334334
- additionalPrinterColumns:
335+
- jsonPath: .status.conditions[?(@.type=="Ready")].status
336+
name: Ready
337+
type: string
338+
- jsonPath: .status.conditions[?(@.type=="Ready")].message
339+
name: Status
340+
type: string
335341
- jsonPath: .status.lastAutomationRunTime
336342
name: Last run
343+
priority: 1
337344
type: string
345+
- jsonPath: .metadata.creationTimestamp
346+
name: Age
347+
type: date
338348
name: v1beta2
339349
schema:
340350
openAPIV3Schema:

0 commit comments

Comments
 (0)