mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-17 20:56:08 +00:00
Add printer columns for DownloadRequest and ServerStatusRequest (#10229)
DownloadRequest and ServerStatusRequest were the last two Velero CRDs without printer columns, so kubectl showed only NAME and AGE for both. DownloadRequest gains the target kind and name, its phase, and age. ServerStatusRequest gains its phase, the reported server version, the time the controller processed it, and age. status.downloadURL is deliberately left out: it is a pre-signed URL that grants access to the object, and a default list view is the wrong place for it. status.expiration is left out because kubectl renders a date column as time elapsed, so a future timestamp prints <invalid>. Signed-off-by: saral <ilovegojo2580@gmail.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Add printer columns for DownloadRequest and ServerStatusRequest so kubectl shows their target, status and server version
|
||||
@@ -16,7 +16,23 @@ spec:
|
||||
singular: downloadrequest
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
- additionalPrinterColumns:
|
||||
- description: The type of file to download
|
||||
jsonPath: .spec.target.kind
|
||||
name: Target Kind
|
||||
type: string
|
||||
- description: The name of the resource the file is associated with
|
||||
jsonPath: .spec.target.name
|
||||
name: Target Name
|
||||
type: string
|
||||
- description: The status of the download request
|
||||
jsonPath: .status.phase
|
||||
name: Status
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
@@ -104,3 +120,4 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
|
||||
@@ -16,7 +16,23 @@ spec:
|
||||
singular: serverstatusrequest
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
- additionalPrinterColumns:
|
||||
- description: The status of the server status request
|
||||
jsonPath: .status.phase
|
||||
name: Status
|
||||
type: string
|
||||
- description: The Velero server version
|
||||
jsonPath: .status.serverVersion
|
||||
name: Server Version
|
||||
type: string
|
||||
- description: The time the request was processed by the controller
|
||||
jsonPath: .status.processedTimestamp
|
||||
name: Processed
|
||||
type: date
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
@@ -82,3 +98,4 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -99,6 +99,10 @@ type DownloadRequestStatus struct {
|
||||
// +kubebuilder:object:generate=true
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:resource:shortName=dreq
|
||||
// +kubebuilder:printcolumn:name="Target Kind",type="string",JSONPath=".spec.target.kind",description="The type of file to download"
|
||||
// +kubebuilder:printcolumn:name="Target Name",type="string",JSONPath=".spec.target.name",description="The name of the resource the file is associated with"
|
||||
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase",description="The status of the download request"
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
||||
|
||||
// DownloadRequest is a request to download an artifact from backup object storage, such as a backup
|
||||
// log file.
|
||||
|
||||
@@ -28,6 +28,10 @@ import (
|
||||
// +kubebuilder:resource:shortName=ssr
|
||||
// +kubebuilder:object:generate=true
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase",description="The status of the server status request"
|
||||
// +kubebuilder:printcolumn:name="Server Version",type="string",JSONPath=".status.serverVersion",description="The Velero server version"
|
||||
// +kubebuilder:printcolumn:name="Processed",type="date",JSONPath=".status.processedTimestamp",description="The time the request was processed by the controller"
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
||||
|
||||
// ServerStatusRequest is a request to access current status information about
|
||||
// the Velero server.
|
||||
|
||||
Reference in New Issue
Block a user