@@ -46,6 +46,11 @@ type QdrantClusterSnapshotStatus struct {
4646 // The calculated time (in UTC) this snapshot will be deleted, if so.
4747 // +optional
4848 RetainUntil * metav1.Time `json:"retainUntil,omitempty"`
49+ // CompletionTime specifies how long it took for the snapshot to complete
50+ // When serialized, it is a Duration in string format which follows "DDdHHhMMmSSs" format
51+ // For example: "1d3h5m10s", "3h5m10s", "5m10s", "10s" etc.
52+ // +optional
53+ CompletionTime * metav1.Duration `json:"completionTime,omitempty"`
4954}
5055
5156type VolumeSnapshotInfo struct {
@@ -66,6 +71,7 @@ type VolumeSnapshotInfo struct {
6671// +kubebuilder:printcolumn:name="clusterid",type=string,JSONPath=`.spec.cluster-id`
6772// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
6873// +kubebuilder:printcolumn:name="retainUntil",type=string,JSONPath=`.status.retainUntil`
74+ // +kubebuilder:printcolumn:name="completion-time",type=string,JSONPath=`.status.completionTime`
6975// +kubebuilder:printcolumn:name="age",type=date,JSONPath=`.metadata.creationTimestamp`
7076
7177// QdrantClusterSnapshot is the Schema for the qdrantclustersnapshots API
@@ -77,6 +83,10 @@ type QdrantClusterSnapshot struct {
7783 Status QdrantClusterSnapshotStatus `json:"status,omitempty"`
7884}
7985
86+ func (qcs * QdrantClusterSnapshot ) IsCompleted () bool {
87+ return qcs .Status .Phase == SnapshotSucceeded || qcs .Status .Phase == SnapshotFailed || qcs .Status .Phase == SnapshotSkipped
88+ }
89+
8090//+kubebuilder:object:root=true
8191
8292// QdrantClusterSnapshotList contains a list of QdrantClusterSnapshot
0 commit comments