-
Notifications
You must be signed in to change notification settings - Fork 431
Check if NVIDIA kernel modules are loaded to avoid modprobe #1746
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
base: main
Are you sure you want to change the base?
Check if NVIDIA kernel modules are loaded to avoid modprobe #1746
Conversation
fbbd6e4 to
391dd63
Compare
391dd63 to
427409e
Compare
427409e to
eae084f
Compare
0fad456 to
12a3616
Compare
| {{- if .Driver.Spec.Version }} | ||
| - name: DRIVER_VERSION | ||
| value: {{ .Driver.Spec.Version | quote }} | ||
| {{- end }} | ||
| {{- if .Driver.Spec.KernelModuleType }} | ||
| - name: KERNEL_MODULE_TYPE | ||
| value: {{ .Driver.Spec.KernelModuleType | quote }} | ||
| {{- end }} | ||
| {{- if .Driver.Spec.DriverType }} | ||
| - name: DRIVER_TYPE | ||
| value: {{ .Driver.Spec.DriverType | quote }} | ||
| {{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question -- do we not need to make similar changes to the DaemonSet that gets rendered by the ClusterPolicy controller?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, are we expecting our controller to set the DRIVER_VERSION variable or are we just relying on this variable being set in our driver-container image itself? (I think we should just do the latter).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, are we expecting our controller to set the
DRIVER_VERSIONvariable or are we just relying on this variable being set in our driver-container image itself? (I think we should just do the latter).
For the init container, the controller must set it. For the driver container, we rely on the image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, makes sense that these variables need to always be added to the init container. I think my first question still stands -- do we need to make similar changes to the ClusterPolicy controller? Or is this already being set there?
Also, I notice that you only added the DRIVER_TYPE variable to the test files in internal/state/testdata/golden. Shouldn't we also be adding DRIVER_VERSION by default to the initContainer that gets rendered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just pushed a commit--we do need to make similar changes in the ClusterPolicy controller. They're in now.
Also, I notice that you only added the DRIVER_TYPE variable to the test files in internal/state/testdata/golden. Shouldn't we also be adding DRIVER_VERSION by default to the initContainer that gets rendered?
Looking into this now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DRIVER_VERSION is conditionally rendered in the template--the golden files only include DRIVER_VERSION when the test fixture sets .Spec.Version.
I've now updated the test fixtures to set the version in getMinimalDriverRenderData(), which means that the golden files now include.
a33e6af to
7f1d75c
Compare
Signed-off-by: Karthik Vetrivel <[email protected]>
Signed-off-by: Karthik Vetrivel <[email protected]>
…ger init container for ClusterPolicy controller Signed-off-by: Karthik Vetrivel <[email protected]>
7f1d75c to
9a888c0
Compare
This PR is a part of this endeavor:
Relevant PRs: