NVIDIA / k8s-device-plugin

NVIDIA device plugin for Kubernetes
Apache License 2.0
2.81k stars 625 forks source link

Error: template: nvidia-device-plugin/templates/gfd.yml:22:19: executing "nvidia-device-plugin/templates/gfd.yml" at <.Subcharts.gfd>: nil pointer evaluating interface {}.gfd #400

Open hanzhc opened 1 year ago

hanzhc commented 1 year ago

When I execute the command below, I got the error message: $ helm install nvdp nvidia-device-plugin --namespace kube-system --version=0.14.0 --set gfd.enabled=true --dry-run

Error: template: nvidia-device-plugin/templates/gfd.yml:22:19: executing "nvidia-device-plugin/templates/gfd.yml" at <.Subcharts.gfd>: nil pointer evaluating interface {}.gfd

how can i solve it?

elezar commented 1 year ago

Which version of helm are you running?

I have just tested with:

$ helm version 2>/dev/null
version.BuildInfo{Version:"v3.10.1", GitCommit:"9f88ccb6aee40b9a0535fcc7efea6055e1ef72c9", GitTreeState:"clean", GoVersion:"go1.18.7"}

And do not see the error that you're seeing when I run:

helm install nvdp/nvidia-device-plugin --namespace kube-system --version=0.14.0 --set gfd.enabled=true --dry-run --generate-name

Note that I had to change nvdp nvidia-device-plugin to nvdp/nvidia-device-plugin and add the --generate-name argument here to ensure that the command does not raise errors (although these were CLI errors and not template errors).

hanzhc commented 1 year ago

@elezar The details are below: $ helm version version.BuildInfo{Version:"v3.5.2", GitCommit:"167aac70832d3a384f65f9745335e9fb40169dc2", GitTreeState:"dirty", GoVersion:"go1.15.7"}

$ helm search repo nvdp --devel NAME CHART VERSION APP VERSION DESCRIPTION nvdp/nvidia-device-plugin 0.14.0 0.14.0 A Helm chart for the nvidia-device-plugin on Ku...

I need to download the chart to the local,so I execute the command below:

$ helm fetch nvdp/nvidia-device-plugin Then I unzip the chart and execute the command below:

$ helm install my-plugin ./nvidia-device-plugin --namespace kube-system --version=0.14.0 --set gfd.enabled=true --dry-run

then I got an error:

Error: template: nvidia-device-plugin/templates/gfd.yml:22:19: executing "nvidia-device-plugin/templates/gfd.yml" at <.Subcharts.gfd>: nil pointer evaluating interface {}.gfd

66545shiwo commented 1 year ago

I get the same error.

$ helm install nvidia-device-plugin --namespace nvidia-device-plugin --create-namespace --version 0.14.0 .
Error: template: nvidia-device-plugin/templates/daemonset.yml:206:49: executing "nvidia-device-plugin/templates/daemonset.yml" at <.Subcharts.gfd>: nil pointer evaluating interface {}.gfd
$ helm version 
version.BuildInfo{Version:"v3.6.1", GitCommit:"61d8e8c4a6f95540c15c6a65f36a6dd0a45e7a2f", GitTreeState:"clean", GoVersion:"go1.16.5"}
elezar commented 1 year ago

@ArangoGutierrez would you be able to have a look a this?

ArangoGutierrez commented 1 year ago

As @elezar , it works for me

$ helm version
version.BuildInfo{Version:"v3.11", GitCommit:"", GitTreeState:"", GoVersion:"go1.19.6"}

Could you try updating your HELM cli and trying again?

elezar commented 1 year ago

Looking at the release-notes it may be that at least helm 3.7.0 is required to use the subcharts as defined. Is upgrading Helm an option?

66545shiwo commented 1 year ago

I upgrade my HELM to v3.11.3 and it works fine. Thank you all !

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 90 days with no activity. This issue will be closed in 30 days unless new comments are made or the stale label is removed.