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
2ad47976
Commit
2ad47976
authored
Mar 15, 2018
by
Peter Grant
Committed by
kmova
Sep 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add namespace extended attributes to directory
(cherry picked from commit 75f9bcccbc307e59b9cf4daf83efb255666ff05e)
parent
df002697
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
provisioner.go
cmd/nfs-client-provisioner/provisioner.go
+5
-0
No files found.
cmd/nfs-client-provisioner/provisioner.go
View file @
2ad47976
...
...
@@ -26,6 +26,7 @@ import (
"github.com/golang/glog"
"github.com/kubernetes-incubator/external-storage/lib/controller"
"github.com/pkg/xattr"
"k8s.io/api/core/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
...
...
@@ -65,6 +66,10 @@ func (p *nfsProvisioner) Provision(options controller.VolumeOptions) (*v1.Persis
if
err
:=
os
.
MkdirAll
(
fullPath
,
0777
);
err
!=
nil
{
return
nil
,
errors
.
New
(
"unable to create directory to provision new pv: "
+
err
.
Error
())
}
if
err
:=
xattr
.
Set
(
fullPath
,
"namespace"
,
[]
byte
(
pvcNamespace
));
err
!=
nil
{
return
nil
,
errors
.
New
(
"unable to set extended attributes on directory to provision new pv: "
+
err
.
Error
())
}
os
.
Chmod
(
fullPath
,
0777
)
path
:=
filepath
.
Join
(
p
.
path
,
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