1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-28 02:37:11 +00:00

Change nfd-master deployment mechanism from daemonset to deployment

Signed-off-by: Renaud Gaubert <rgaubert@nvidia.com>
This commit is contained in:
Renaud Gaubert 2020-03-05 14:46:58 -08:00
parent 7e728aecb9
commit db994410a7
2 changed files with 22 additions and 5 deletions

View file

@ -460,8 +460,17 @@ If you want to use the latest development version (master branch) you need to
#### nfd-master
Nfd-master runs as a DaemonSet, by default in the master node(s)
only. You can use the template spec provided to deploy nfd-master, or
Nfd-master runs as a deployment (with a replica count of 1), by default
it prefers running on the cluster's master nodes but will run on worker
nodes if no master nodes are found.
For High Availability, you should simply increase the replica count of
the deployment object. You should also look into adding [inter-pod](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity)
affinity to prevent masters from running on the same node.
However note that inter-pod affinity is costly and is not recommended
in bigger clusters.
You can use the template spec provided to deploy nfd-master, or
use `nfd-master.yaml` generated by `Makefile`. The latter includes
`image:` and `namespace:` definitions that match the latest built
image. Example:

View file

@ -37,13 +37,14 @@ subjects:
namespace: node-feature-discovery
---
apiVersion: apps/v1
kind: DaemonSet
kind: Deployment
metadata:
labels:
app: nfd-master
name: nfd-master
namespace: node-feature-discovery
spec:
replicas: 1
selector:
matchLabels:
app: nfd-master
@ -53,8 +54,15 @@ spec:
app: nfd-master
spec:
serviceAccount: nfd-master
nodeSelector:
node-role.kubernetes.io/master: ""
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: "node-role.kubernetes.io/master"
operator: In
values: [""]
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Equal"