fixed https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/pull/121#discussion_r682744736 and https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/pull/121#discussion_r682746429
This commit is contained in:
parent
cb203b4a46
commit
007787405d
|
|
@ -113,9 +113,13 @@ func (p *nfsProvisioner) Provision(ctx context.Context, options controller.Provi
|
|||
createMode := os.FileMode(0777)
|
||||
annotationCreateMode, exists := metadata.annotations["nfs.io/createMode"]
|
||||
if exists {
|
||||
annotationCreateModeUInt, _ := strconv.ParseUint(annotationCreateMode, 8, 32)
|
||||
annotationCreateModeUInt, err := strconv.ParseUint(annotationCreateMode, 8, 32)
|
||||
if err != nil {
|
||||
glog.Warningf("nfs.io/createMode %s not parsable, skipped", annotationCreateMode)
|
||||
} else {
|
||||
createMode = os.FileMode(annotationCreateModeUInt)
|
||||
}
|
||||
}
|
||||
|
||||
createUID := "0"
|
||||
annotationCreateUID, exists := metadata.annotations["nfs.io/createUID"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue