Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve name of the PV directory name during archiving #59

Merged

Conversation

petermicuch
Copy link
Contributor

This change brings back functionality that was present in the retired nfs-client-provisioner and introduced behavioral change. Having folder that includes namespace, pvc name and pv name also in archived state is beneficial and it is what always made this provisioner different from i.e. AzureFile and similar, where you have to browse and search a long time until you get to your desired archived/created folder.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 25, 2021
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 25, 2021
Copy link
Contributor

@jackielii jackielii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I didn't realised this was changed in the latest version. But this feature was quite useful in the beginning. And sorry I haven't been tracking this closely.

I'd like to hear other reviewers on why this was changed

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jackielii, petermicuch

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 25, 2021
@yonatankahana
Copy link
Contributor

i think it coming from the naming of the variable pvName. in the initial commit, pvName is actually the folder name and not PersistentVolume.metadata.name as you would think. as you can see from the original commit:

path := volume.Spec.PersistentVolumeSource.NFS.Path
pvName := filepath.Base(path)
oldPath := filepath.Join(mountPath, pvName)
archivePath := filepath.Join(mountPath, "archieved-"+pvName)

when @Bledai add the support reclaim policies (#6) I beleive he thought that he is not changing behavior or getting the expected behavior by changing:

archivePath := filepath.Join(mountPath, "archived-"+pvName)

to:

archivePath := filepath.Join(mountPath, "archived-"+volume.Name)

anyway, lgtm.

@petermicuch
Copy link
Contributor Author

@jsafrane is it possible to get this one in without review from @ashishranjan738 ? I see him as required reviewer, but usually only @jackielii reacts to commits in this project.

@jsafrane
Copy link
Contributor

jsafrane commented Mar 3, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 3, 2021
@k8s-ci-robot k8s-ci-robot merged commit a99f3da into kubernetes-sigs:master Mar 3, 2021
@petermicuch petermicuch deleted the restore_delete_folder_name branch March 3, 2021 16:00
@yonatankahana yonatankahana mentioned this pull request Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants