Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nfs-subdir-external-provisioner
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rancher商店
nfs-subdir-external-provisioner
Commits
a54ff504
Commit
a54ff504
authored
Aug 15, 2018
by
Matthew Wong
Committed by
kmova
Sep 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix archiveOnDelete parsing
(cherry picked from commit 9b94fa6ac252e8e43f5a2d77b597b7013253a121)
parent
7c1944a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
provisioner.go
cmd/nfs-client-provisioner/provisioner.go
+8
-6
No files found.
cmd/nfs-client-provisioner/provisioner.go
View file @
a54ff504
...
...
@@ -113,12 +113,14 @@ func (p *nfsProvisioner) Delete(volume *v1.PersistentVolume) error {
// If it exists and has a falsey value, delete the directory.
// Otherwise, archive it.
archiveOnDelete
,
exists
:=
storageClass
.
Parameters
[
"archiveOnDelete"
]
archiveBool
,
err
:=
strconv
.
ParseBool
(
archiveOnDelete
)
if
err
!=
nil
{
return
err
}
if
exists
&&
!
archiveBool
{
return
os
.
RemoveAll
(
oldPath
)
if
exists
{
archiveBool
,
err
:=
strconv
.
ParseBool
(
archiveOnDelete
)
if
err
!=
nil
{
return
err
}
if
!
archiveBool
{
return
os
.
RemoveAll
(
oldPath
)
}
}
archivePath
:=
filepath
.
Join
(
mountPath
,
"archived-"
+
pvName
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment