make kubelet plugin dir configurable#464
Conversation
|
The driver is still trying to register at old path. Need to debug more... |
|
I see a few things missing that are causing that error. These changes should get things further along: guptaNswati/k8s-dra-driver@kubelet-dir-flags...nojnhuh:k8s-dra-driver:pr/464 |
|
Oh i missed the envs but why do we need the kubelet path in for compute-domain-daemon? And atleast this should not cause the socket registation error |
|
Sorry I got turned around amongst the compute-domain binaries. I see you already have the flags on the kubelet-plugin binary which is where I meant to add that. |
|
Adding envs worked. Thank you @nojnhuh :) |
Signed-off-by: Swati Gupta <swatig@nvidia.com>
Signed-off-by: Swati Gupta <swatig@nvidia.com>
9ad5e51 to
6d964b1
Compare
Signed-off-by: Swati Gupta <swatig@nvidia.com>
74190a3 to
feba8f8
Compare
98699dc to
e5712ce
Compare
klueska
left a comment
There was a problem hiding this comment.
Just a few small comments, but looking good overall.
42fff36 to
6d688fe
Compare
Signed-off-by: Swati Gupta <swatig@nvidia.com>
Signed-off-by: Swati Gupta <swatig@nvidia.com>
6d688fe to
ba49202
Compare
| }, | ||
| &cli.StringFlag{ | ||
| Name: "kubelet-registrar-directory-path", | ||
| Usage: "Absolute path to the directory where kubelet stores plugin registrations.", |
There was a problem hiding this comment.
Oh. I noted that in another PR: this is not where the kubelet stores plugin registrations. This is the directory where the kubelet looks for unix domain sockets to discover plugins. A plugin registration then is performed through such socket.
I'd rather have no help text than a misleading one. Feel free to act on this opinion as you wish (I am OK with a merge).
There was a problem hiding this comment.
Yes. see this is how upstream describes it https://github.com/kubernetes/dynamic-resource-allocation/blob/master/kubeletplugin/draplugin.go#L226
go doc --all k8s.io/dynamic-resource-allocation/kubeletplugin.RegistrarDirectoryPath
package kubeletplugin // import "k8s.io/dynamic-resource-allocation/kubeletplugin"
func RegistrarDirectoryPath(path string) Option
RegistrarDirectoryPath sets the path to the directory where the kubelet
expects to find registration sockets of plugins. Typically this is
/var/lib/kubelet/plugins_registry with /var/lib/kubelet being the kubelet's
data directory.
This is also the default. Some Kubernetes clusters may use a different data
directory. This path must be the same inside and outside of the driver's
container. The directory must exist.
i am okay either way. i would prefer not to deviate from upstream as a different description may confuse more.
There was a problem hiding this comment.
Let's leave it as is for now. Feel free to merge.
Backport kubernetes-sigs/dra-example-driver#98 to make kubelet dir path configurable via helm.
fixes: #339
Follow-ups:
Changes tested in local kind cluster.