-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Change GPU plugin NFD init container to run-time container
To work around kustomize inability to enforce correct init container, and because this is more likely way how it will work once NFD drops support for hooks: kubernetes-sigs/node-feature-discovery#856 Signed-off-by: Eero Tamminen <[email protected]>
- Loading branch information
Showing
4 changed files
with
45 additions
and
25 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
deployments/gpu_plugin/overlays/fake_devices/add-nfd-feature-file.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: intel-gpu-plugin | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: intel-gpu-nfd | ||
# convert generated sysfs content to NFD feature labels file | ||
image: intel/intel-gpu-initcontainer:devel | ||
imagePullPolicy: IfNotPresent | ||
securityContext: | ||
readOnlyRootFilesystem: true | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: [ "ALL" ] | ||
volumeMounts: | ||
- name: sysfs | ||
# expects sysfs here | ||
mountPath: /host-sys | ||
readOnly: true | ||
- name: nfd-features | ||
mountPath: /nfd | ||
readOnly: false | ||
workingDir: /usr/local/bin/gpu-sw | ||
# needed until GPU plugin drops NFD hook usage due to: | ||
# https://github.com/kubernetes-sigs/node-feature-discovery/issues/856 | ||
command: ["sh", "-c", "while true; do ./intel-gpu-nfdhook | tee /nfd/fake-gpu; sleep 99999; done"] | ||
volumes: | ||
- name: nfd-features | ||
hostPath: | ||
path: /etc/kubernetes/node-feature-discovery/features.d/ | ||
type: DirectoryOrCreate |
6 changes: 6 additions & 0 deletions
6
deployments/gpu_plugin/overlays/fake_devices/del-intel-gpu-initcontainer.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$patch: delete | ||
spec: | ||
template: | ||
spec: | ||
initContainers: | ||
- name: intel-gpu-initcontainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
deployments/gpu_plugin/overlays/fake_devices/use-nfd-feature-file.yaml
This file was deleted.
Oops, something went wrong.