Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Prototype for nfs-client alias mode #1318

Closed
wants to merge 1 commit into from

Conversation

therc
Copy link

@therc therc commented May 10, 2020

This might be a solution for #1210 and #1275

In combination with an existing NFS claim in namespace X, allow the administrator or the users to create new claims for the same NFS tree in namespaces A, B, C, etc.

This change tries as much as possible NOT to disrupt existing setups.

A few things still left:

  1. Is "alias" the right term? Previous choices I tossed out: clone (easy to mix with real volume cloning), proxy (there's no middle-man NFS server), passthrough (too nebulous).
  2. Is NFS_SERVER=--alias the best way to trigger this?
  3. Should the auto-detection of the server host:path happen always, even when not in alias mode?
  4. Should the parent's ReadOnly field be propagated to the newly provisioned PV?
  5. Should this be made more generic so that one deployment can expose N different claims/trees to the other namespaces? See comment below for more details.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 10, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @therc!

It looks like this is your first PR to kubernetes-incubator/external-storage 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-incubator/external-storage has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 10, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign wongma7
You can assign the PR to them by writing /assign @wongma7 in a comment when ready.

The full list of commands accepted by this bot can be found 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 requested review from jsafrane and wongma7 May 10, 2020 00:56
@therc
Copy link
Author

therc commented May 10, 2020

"Clone mode" is very confusing, I think "passthrough" is clearer and more descriptive. "Alias" mode might be the clearest choice.

Naming aside, this could be made more generic so that you don't need to run a million alias provisioners if you have more than one NFS tree to expose to your namespaces.

Let's say you have three existing claims: data, code, docs. You want them to be available in any number of other namespaces, as allowed by RBAC. You run the nfs-client provisioner foo.com/nfs-alias, mounting the three claims under /persistentvolumes/. Add a storage class shared-volumes using the new provisioner. Now I create claim code in namespace developer1 under that class. The provisioner will lookup the server:path for /persistentvolumes/code and stick those in a new volume developer1-code-BLABLABLA.

If others agree that the generic, multi-claim approach is better, I can change alias mode to use NFS_PATH as the directory inside the provisioner's container where we look up mounted claims. In the example above, it would be set to /persistentvolumes.

@therc therc changed the title Prototype for clone mode Prototype for nfs-client passthrough mode May 10, 2020
@therc therc changed the title Prototype for nfs-client passthrough mode Prototype for nfs-client alias mode May 10, 2020
This might be a solution for kubernetes-retired#1210 and kubernetes-retired#1275

In combination with an existing NFS claim in namespace X, allow the administrator or the users to create new claims for the same NFS tree in namespaces A, B, C, etc.

This change tries as much as possible NOT to disrupt existing setups.

A few things still left:

1. Is "alias" the right term? Previous choices I tossed out: clone (easy to mix with real volume cloning), proxy (there's no middle-man NFS server), passthrough (too nebulous).
1. Is NFS_SERVER=--alias the best way to trigger this?
1. Should the auto-detection of the server host:path happen always, even when not in alias mode?
1. Should the parent's ReadOnly field be propagated to the newly provisioned PV?
1. Should this be made more generic so that one deployment can expose N different claims/trees to the other namespaces? See comment below for more details.
@therc therc force-pushed the volume-clone-mode branch from 57ffa3a to 20ea1f4 Compare May 10, 2020 17:12
@therc
Copy link
Author

therc commented Jun 9, 2020

Ping?

@kmova
Copy link

kmova commented Jul 29, 2020

@therc - We are in the middle of migrating the NFS client code into a new home under https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner. The migration PR is up for review at the moment. kubernetes-sigs/nfs-subdir-external-provisioner#2

Sorry to have kept mum on this PR for a while, can I circle back with you once the above migration PR is merged and take your help to shift these changes into the new repo?

@therc
Copy link
Author

therc commented Jul 29, 2020

Sounds good, @kmova... thank you!

@nikhita
Copy link
Member

nikhita commented Aug 7, 2020

As @kmova mentioned, we are in the process of archiving this repo and continuing work in https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner. Please reopen a PR in the new repo once kubernetes-sigs/nfs-subdir-external-provisioner#2 has merged. Thanks for your patience! :)

Going to close this PR in order to be able to archive this repo.

@nikhita nikhita closed this Aug 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants