Skip to content

Commit

Permalink
Use a marker for the Namespace VSC additional printer column
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
  • Loading branch information
leonardoce committed May 22, 2024
1 parent 0bec91d commit 5c6b2fb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions client/apis/volumesnapshot/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ type VolumeSnapshotClassList struct {
// +kubebuilder:printcolumn:name="Driver",type=string,JSONPath=`.spec.driver`,description="Name of the CSI driver used to create the physical snapshot on the underlying storage system."
// +kubebuilder:printcolumn:name="VolumeSnapshotClass",type=string,JSONPath=`.spec.volumeSnapshotClassName`,description="Name of the VolumeSnapshotClass to which this snapshot belongs."
// +kubebuilder:printcolumn:name="VolumeSnapshot",type=string,JSONPath=`.spec.volumeSnapshotRef.name`,description="Name of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound."
// +kubebuilder:printcolumn:name="VolumeSnapshotNamespace",type=string,JSONPath=`.spec.volumeSnapshotRef.namespace`,description="Namespace of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound."
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
type VolumeSnapshotContent struct {
metav1.TypeMeta `json:",inline"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ spec:
jsonPath: .spec.volumeSnapshotRef.name
name: VolumeSnapshot
type: string
- description: Namespace of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound.
- description: Namespace of the VolumeSnapshot object to which this VolumeSnapshotContent
object is bound.
jsonPath: .spec.volumeSnapshotRef.namespace
name: VolumeSnapshotNamespace
type: string
Expand Down
2 changes: 0 additions & 2 deletions client/hack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ Update the restoreSize property to use type string only:
```
* Add the VolumeSnapshot namespace to the `additionalPrinterColumns` section in `client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml`. Refer https://github.com/kubernetes-csi/external-snapshotter/pull/535 for more details.
## Test suite
The `test-suite` directory contains several test cases that are useful to
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package utils
import (
"context"
"encoding/json"
crdv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1"

crdv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1alpha1"
crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
clientset "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5c6b2fb

Please sign in to comment.