Skip to content

Commit

Permalink
make data safer by default.in case user delete pvc by accident , and …
Browse files Browse the repository at this point in the history
…data lost happens

Signed-off-by: peng9808 <[email protected]>
  • Loading branch information
peng9808 committed Jul 15, 2024
1 parent 4c28373 commit 339b10e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion helm/operator/templates/hwameistorcluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ spec:
chartVersion: "v0.4.1"
storageClass:
allowVolumeExpansion: true
reclaimPolicy: "Delete"
reclaimPolicy: {{ $.Values.storageClassReclaimPolicy }}
fsType: "xfs"

dataLoadManager:
Expand Down
2 changes: 2 additions & 0 deletions helm/operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ dataLoadInit:
imageRepository: hwameistor/dataload-init
tag: v0.0.1


#storageClassReclaimPolicy: Retain > Delete
#datasetDefaultPoolClass: NVMe > SSD > HDD

# diskReserve example
Expand Down
2 changes: 1 addition & 1 deletion pkg/install/storageclass/storageclass.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewMaintainer(cli client.Client, clusterInstance *hwameistoroperatorv1alpha

var volumeBindingWaitForFirstConsumer = storagev1.VolumeBindingWaitForFirstConsumer
var defaultAllowVolumeExpansionBooleanValue = true
var defaultReclaimPolicy = corev1.PersistentVolumeReclaimDelete
var defaultReclaimPolicy = corev1.PersistentVolumeReclaimRetain
var defaultDiskType = "HDD"
var defaultFSType = "xfs"

Expand Down

0 comments on commit 339b10e

Please sign in to comment.