From 513433d4b16b88173f4173dfe9dc6a6edbfea1a4 Mon Sep 17 00:00:00 2001 From: Hanna Bledai Date: Thu, 8 Oct 2020 15:40:37 +0300 Subject: [PATCH] Update README, remove dublicated lines --- README.md | 2 +- cmd/nfs-subdir-external-provisioner/provisioner.go | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7789f6dd..326f085f 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ You may also want to change the PROVISIONER_NAME above from ``fuseim.pri/ifs`` t **Step 5: Deploying your storage class** -***Paraments:*** +***paraments:*** | Name | Description | Default | |------|-------------|:--------:| diff --git a/cmd/nfs-subdir-external-provisioner/provisioner.go b/cmd/nfs-subdir-external-provisioner/provisioner.go index d199293c..d220f07f 100644 --- a/cmd/nfs-subdir-external-provisioner/provisioner.go +++ b/cmd/nfs-subdir-external-provisioner/provisioner.go @@ -168,14 +168,12 @@ func (p *nfsProvisioner) Delete(volume *v1.PersistentVolume) error { // Otherwise, archive it. archiveOnDelete, exists := storageClass.Parameters["archiveOnDelete"] if exists { - if exists { - archiveBool, err := strconv.ParseBool(archiveOnDelete) - if err != nil { - return err - } - if !archiveBool { - return os.RemoveAll(oldPath) - } + archiveBool, err := strconv.ParseBool(archiveOnDelete) + if err != nil { + return err + } + if !archiveBool { + return os.RemoveAll(oldPath) } }