From 3eb6dca3c18a621564f4bf41e5750e52f423262f Mon Sep 17 00:00:00 2001 From: ushabelgur Date: Thu, 21 Nov 2024 10:50:49 +0530 Subject: [PATCH] incorporating review comments --- api/storage/v1alpha1/volume_types.go | 20 ++++++++++---------- internal/apis/storage/volume_types.go | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/api/storage/v1alpha1/volume_types.go b/api/storage/v1alpha1/volume_types.go index b6e983224..51d80b091 100644 --- a/api/storage/v1alpha1/volume_types.go +++ b/api/storage/v1alpha1/volume_types.go @@ -56,6 +56,16 @@ type VolumeAccess struct { VolumeAttributes map[string]string `json:"volumeAttributes,omitempty"` } +// ReclaimPolicy for a Volume tells what to do with the volume after its managing resource has been deleted +type ReclaimPolicy string + +const ( + // The Volume resource is not deleted after the managing resource has been deleted + Retain ReclaimPolicy = "Retain" + // The Volume resource is garbage-collected when the managing resource has been deleted + Delete ReclaimPolicy = "Delete" +) + // VolumeStatus defines the observed state of Volume type VolumeStatus struct { // State represents the infrastructure state of a Volume. @@ -123,16 +133,6 @@ type VolumeList struct { Items []Volume `json:"items"` } -// ReclaimPolicy for a Volume tells what to do with the volume after its managing resource has been deleted -type ReclaimPolicy string - -const ( - // The Volume resource is not deleted after the managing resource has been deleted - Retain ReclaimPolicy = "Retain" - // The Volume resource is garbage-collected when the managing resource has been deleted - Delete ReclaimPolicy = "Delete" -) - type EphemeralVolumeSpec struct { VolumeSpec `json:",inline"` // ReclaimPolicy defines the strategy for the corresponding volume resource after its managing resource has been deleted diff --git a/internal/apis/storage/volume_types.go b/internal/apis/storage/volume_types.go index d12e99f03..b05a437a7 100644 --- a/internal/apis/storage/volume_types.go +++ b/internal/apis/storage/volume_types.go @@ -55,6 +55,16 @@ type VolumeAccess struct { VolumeAttributes map[string]string } +// ReclaimPolicy for a Volume tells what to do with the volume after its managing resource has been deleted +type ReclaimPolicy string + +const ( + // The Volume resource is not deleted after the managing resource has been deleted + Retain ReclaimPolicy = "Retain" + // The Volume resource is garbage-collected when the managing resource has been deleted + Delete ReclaimPolicy = "Delete" +) + // VolumeStatus defines the observed state of Volume type VolumeStatus struct { // State represents the infrastructure state of a Volume. @@ -122,16 +132,6 @@ type VolumeList struct { Items []Volume } -// ReclaimPolicy for a Volume tells what to do with the volume after its managing resource has been deleted -type ReclaimPolicy string - -const ( - // The Volume resource is not deleted after the managing resource has been deleted - Retain ReclaimPolicy = "Retain" - // The Volume resource is garbage-collected when the managing resource has been deleted - Delete ReclaimPolicy = "Delete" -) - type EphemeralVolumeSpec struct { VolumeSpec // ReclaimPolicy defines the strategy for the corresponding volume resource after its managing resource has been deleted