Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
guozhi.li committed Oct 23, 2023
1 parent 0a53be3 commit b307ff2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/main-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ func (c *Controller) syncHandler(key string) (Result, error) {
// Just output the error. Will not retry.
runtime.HandleError(fmt.Errorf("DeletePrometheusAddlConfig '%s/%s' error:%s", namespace, tenantName, err.Error()))
}
// try to delete pvc if set StroageDeletionLabel:true
// try to delete pvc if set StorageDeletionLabel:true
pvcList := corev1.PersistentVolumeClaimList{}
listOpt := client.ListOptions{
Namespace: namespace,
Expand All @@ -765,7 +765,7 @@ func (c *Controller) syncHandler(key string) (Result, error) {
runtime.HandleError(fmt.Errorf("PersistentVolumeClaimList '%s/%s' error:%s", namespace, tenantName, err.Error()))
}
for _, pvc := range pvcList.Items {
if pvc.Labels[statefulsets.StroageDeletionLabel] == "true" {
if pvc.Labels[statefulsets.StorageDeletionLabel] == "true" {
err := c.k8sClient.Delete(ctx, &pvc)
if err != nil {
runtime.HandleError(fmt.Errorf("Delete PersistentVolumeClaim '%s/%s/%s' error:%s", namespace, tenantName, pvc.Name, err.Error()))
Expand Down

0 comments on commit b307ff2

Please sign in to comment.