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 080e586
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM centos:7

FROM centos:7

# Update the CentOS repository configuration
RUN sed -i 's|mirrorlist=http://mirrorlist.centos.org/?|#mirrorlist=http://mirrorlist.centos.org/?|g' /etc/yum.repos.d/CentOS-*.repo && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
Expand Down
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 080e586

Please sign in to comment.