gpu_plugin: add kustomizations

- Default deployment: `kubectl apply -k deployments/gpu_plugin`
- Default deployment does not specify namespace anymore
  (was: `kube-system`).
- Variant: deploy only on nodes with Intel GPU label by NFD:
  `kubectl apply -k deployments/gpu_plugin/overlays/nfd_labeled_nodes`
- Variant: deploy to `kube-system` instead of user-defined namespace
  (or "default"):
  `kubectl apply -k deployments/gpu_plugin/overlays/namespace_kube-system`
- GPU plugin README updated.

Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
This commit is contained in:
Antti Kervinen 2020-02-06 11:08:12 +02:00
parent f036b72cff
commit d568f050c5
8 changed files with 40 additions and 3 deletions

View File

@ -84,10 +84,22 @@ Successfully tagged intel/intel-gpu-plugin:devel
### Deploy plugin DaemonSet ### Deploy plugin DaemonSet
You can then use the example DaemonSet YAML file provided to deploy the plugin. You can then use the [example DaemonSet YAML](../../deployments/gpu_plugin/base/intel-gpu-plugin.yaml)
file provided to deploy the plugin. The default kustomization that deploys the YAML as is:
```bash ```bash
$ kubectl create -f ./deployments/gpu_plugin/gpu_plugin.yaml $ kubectl apply -k deployments/gpu_plugin
daemonset.apps/intel-gpu-plugin created
```
Alternatively, if your cluster runs
[Node Feature Discovery](https://github.com/kubernetes-sigs/node-feature-discovery),
you can deploy the device plugin only on nodes with Intel GPU.
The [nfd_labeled_nodes](../../deployments/gpu_plugin/overlays/nfd_labeled_nodes/)
kustomization adds the nodeSelector to the DaemonSet:
```bash
$ kubectl apply -k deployments/gpu_plugin/overlays/nfd_labeled_nodes
daemonset.apps/intel-gpu-plugin created daemonset.apps/intel-gpu-plugin created
``` ```

View File

@ -2,7 +2,6 @@ apiVersion: apps/v1
kind: DaemonSet kind: DaemonSet
metadata: metadata:
name: intel-gpu-plugin name: intel-gpu-plugin
namespace: kube-system
labels: labels:
app: intel-gpu-plugin app: intel-gpu-plugin
spec: spec:

View File

@ -0,0 +1,2 @@
resources:
- intel-gpu-plugin.yaml

View File

@ -0,0 +1,2 @@
bases:
- base

View File

@ -0,0 +1,5 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: intel-gpu-plugin
namespace: kube-system

View File

@ -0,0 +1,4 @@
bases:
- ../../base
patches:
- add-namespace-kube-system.yaml

View File

@ -0,0 +1,9 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: intel-gpu-plugin
spec:
template:
spec:
nodeSelector:
feature.node.kubernetes.io/pci-0300_8086.present: "true"

View File

@ -0,0 +1,4 @@
bases:
- ../../base
patches:
- add-nodeselector-intel-gpu.yaml