mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-15 19:56:06 +00:00
Add printer columns for Backup and Restore CRDs (#10200)
e2e-test-kind.yaml / extract (push) Failing after 7s
Run the E2E test on kind / get-go-version (push) Failing after 9s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 6s
Main CI / get-go-version (push) Failing after 7s
Main CI / Build (push) Skipped
e2e-test-kind.yaml / extract (push) Failing after 7s
Run the E2E test on kind / get-go-version (push) Failing after 9s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 6s
Main CI / get-go-version (push) Failing after 7s
Main CI / Build (push) Skipped
* Add printer columns for Backup and Restore CRDs kubectl get backup and kubectl get restore fall back to the default NAME/AGE table because neither type declares printer columns, while Schedule and BackupStorageLocation do. Anything reading the API without the velero binary cannot see a backup's phase, error count or timing. Printer columns were added in #2881 and reverted in #3652 as a workaround for #3600, a CRD install error that was never root-caused. Schedule regained columns in 2022 and BackupStorageLocation has them today, with no recurrence. Only fields expressible as plain JSONPath are included. Expiration is deliberately omitted: kubectl renders a date column as time elapsed, so a future expiration prints <invalid>, which covers every backup that has not yet expired. Fixes #10199 Signed-off-by: saral <ilovegojo2580@gmail.com> * Rename changelog name to pass changelog check Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com> --------- Signed-off-by: saral <ilovegojo2580@gmail.com> Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com> Co-authored-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
This commit is contained in:
co-authored by
Tiger Kaovilai
parent
3da77b9469
commit
ae1d869c77
@@ -520,6 +520,11 @@ type HookStatus struct {
|
||||
// +kubebuilder:rbac:groups=velero.io,resources=backups,verbs=create;delete;get;list;patch;update;watch
|
||||
// +kubebuilder:rbac:groups=velero.io,resources=backups/status,verbs=get;update;patch
|
||||
// +kubebuilder:resource:shortName=bak
|
||||
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase",description="Backup status such as New/InProgress"
|
||||
// +kubebuilder:printcolumn:name="Errors",type="integer",JSONPath=".status.errors",description="Total number of errors logged during the backup"
|
||||
// +kubebuilder:printcolumn:name="Warnings",type="integer",JSONPath=".status.warnings",description="Total number of warnings logged during the backup"
|
||||
// +kubebuilder:printcolumn:name="Started",type="date",JSONPath=".status.startTimestamp",description="The time the backup was started"
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
||||
|
||||
// Backup is a Velero resource that represents the capture of Kubernetes
|
||||
// cluster state at a point in time (API objects and associated volume state).
|
||||
|
||||
@@ -420,6 +420,11 @@ type RestoreProgress struct {
|
||||
// +kubebuilder:rbac:groups=velero.io,resources=restores,verbs=create;delete;get;list;patch;update;watch
|
||||
// +kubebuilder:rbac:groups=velero.io,resources=restores/status,verbs=get;update;patch
|
||||
// +kubebuilder:resource:shortName=rst
|
||||
// +kubebuilder:printcolumn:name="Backup",type="string",JSONPath=".spec.backupName",description="The name of the backup this restore is from"
|
||||
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase",description="Restore status such as New/InProgress"
|
||||
// +kubebuilder:printcolumn:name="Errors",type="integer",JSONPath=".status.errors",description="Total number of errors logged during the restore"
|
||||
// +kubebuilder:printcolumn:name="Warnings",type="integer",JSONPath=".status.warnings",description="Total number of warnings logged during the restore"
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
||||
|
||||
// Restore is a Velero resource that represents the application of
|
||||
// resources from a Velero backup to a target Kubernetes cluster.
|
||||
|
||||
Reference in New Issue
Block a user