-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Feature request: Allow customizing host path used for dynamically provisioned PersistentVolumes #5144
Comments
This sounds like a good idea! PR's welcome! Since |
Ah, |
I thought the complaint was about the But I'm not sure about giving human names to a machine-managed resources, ripe for conflicts ? |
This feature request (not complaint!) is about both, because I did not know about #3318. :)
For there to be a conflict, there would have to be two PVCs with the same name, which is already disallowed by kubernetes, right? |
Possibly. The whole hostpath provisioner desperately needs a rewrite anyway, so maybe this is a good feature to have in the new one |
I could look into this, along with #3318. Did a quick look into the code, do you think it is enough to just change/parametrize the path (minikube-only change), or should we change how the PV name is created (change in sig-storage-lib-external-provisioner, affecting all implementations)? |
From my point-of-view,It's probably good enough to fix this for minikube. Would switching to https://github.com/rancher/local-path-provisioner help? |
i will stick with mounting "/tmp/hostpath-provisioner" on that path and then run minikube start via a wrapper script until that is done |
/assign @nanikjava |
Addons such as storage-provisioner is deployed as Docker image and it need to be generated. Following are the steps to use the newly generated Docker image:
There are primarily 2 different issues that needs to be fixed to make storage-provisioner works:
|
The smallest generated workable image is using |
@nanikjava did you take into account what the others k8s images are using? as this would get shared. |
I did looked into the other Dockerfiles that are inside minikube and most of the images that it is using are ubuntu which is much bigger in terms of size. Opted out using the debian-base from k8 repository as the final image comes to less than 75MB |
@nanikjava while i respect your effort of keeping a image small i think that is not the most importent case as docker images are layered if you depend on the same image and image version of other images it gets reused in var/lib/docker it will exist only once! so when 1 image uses ubuntu === 200mb 50 other images can depend on that and it will take only 200mb + size of the individual images. so lets say the 50 images all include a file with 1kb we get total size of 51 Images 200.05MB |
PR #6156 |
As discussed in the review, the storage-provisioner was supposed to be built statically. i.e. first we reused LOCALKUBE_LDFLAGS for the storage provisioner 0fe440e If we wanted to link it dynamically, we could consider using docker.io/golang:1.13.4-alpine docker.io/golang:1.13.4-buster see https://hub.docker.com/_/golang But for now, I think we will keep the static binary. @tstromberg fixed the linking, in bf0dc79
That will work with the It also doesn't affect the paths at all ? |
In case you really wonder about size, here is a breakdown on relative sizes of the 27M binary: https://gist.github.com/afbjorklund/7fc8583e4ff03e8dcc958662821e2083 Most of it comes from the dependencies, mainly github.com/golang/glog and k8s.io (with friends) 282 dependencies (54 internal, 228 external, 0 testing). |
@afbjorklund have modified the PR to use |
More documentation on working with storage-provisioner
use the following command to deploy |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
kindly help me to change the hosthpath provisioner (k8s.io/minikube-hostpath) in the minikube , Because my deployments are in the root directory due to that i am facing storage issue . |
we have created our own pv and pvc even though it is mounting on our root directory |
Dynamic persistent volume provisioning works great, but uses paths like
which are not easy to remember and type. For development and testing, it would be much more convenient if the path could be customized to something along the lines of:
This would make a PVC named
mysqldb
resolve to an automatically generated PV that stores the data in/data/mysqldb
. Much easier to remember and type! :)The text was updated successfully, but these errors were encountered: