mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-15 11:46:06 +00:00
Add printer columns for VolumeSnapshotLocation (#10216)
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
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 / run-e2e-test (push) Skipped
build-image / Build (push) Failing after 7s
push.yml / extract (push) Failing after 8s
Main CI / get-go-version (push) Failing after 9s
Main CI / Build (push) Skipped
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
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 / run-e2e-test (push) Skipped
build-image / Build (push) Failing after 7s
push.yml / extract (push) Failing after 8s
Main CI / get-go-version (push) Failing after 9s
Main CI / Build (push) Skipped
kubectl get volumesnapshotlocation falls back to NAME and AGE, while BackupStorageLocation beside it shows provider and phase. This follows the same pattern for the remaining location type. Phase is worth surfacing here because the CLI does not print it. velero snapshot-location get shows only NAME and PROVIDER, so status.phase, which carries the same Available/Unavailable enum as BackupStorageLocation, is currently not visible from either tool. Raised as an open question on #10199 and left out of #10200 to keep that change to the two types the issue was filed about. Signed-off-by: saral <ilovegojo2580@gmail.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Add printer columns for VolumeSnapshotLocation so kubectl shows provider and phase
|
||||
@@ -16,7 +16,19 @@ spec:
|
||||
singular: volumesnapshotlocation
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
- additionalPrinterColumns:
|
||||
- description: Provider is the provider of the volume storage
|
||||
jsonPath: .spec.provider
|
||||
name: Provider
|
||||
type: string
|
||||
- description: Volume Snapshot Location status such as Available/Unavailable
|
||||
jsonPath: .status.phase
|
||||
name: Phase
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: VolumeSnapshotLocation is a location where Velero stores volume
|
||||
@@ -93,3 +105,4 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -27,6 +27,9 @@ import (
|
||||
// +kubebuilder:resource:shortName=vsl
|
||||
// +kubebuilder:object:generate=true
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:printcolumn:name="Provider",type="string",JSONPath=".spec.provider",description="Provider is the provider of the volume storage"
|
||||
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Volume Snapshot Location status such as Available/Unavailable"
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
||||
|
||||
// VolumeSnapshotLocation is a location where Velero stores volume snapshots.
|
||||
type VolumeSnapshotLocation struct {
|
||||
|
||||
Reference in New Issue
Block a user