2020-12-16 17:27:31 +00:00
|
|
|
# All changes in this template should be applied to Helm chart too.
|
|
|
|
#
|
2019-01-11 13:55:28 +00:00
|
|
|
apiVersion: v1
|
2019-05-28 14:13:52 +00:00
|
|
|
kind: Namespace
|
|
|
|
metadata:
|
|
|
|
name: node-feature-discovery # NFD namespace
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
2019-01-11 13:55:28 +00:00
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: nfd-master
|
2019-05-28 14:13:52 +00:00
|
|
|
namespace: node-feature-discovery
|
2019-01-11 13:55:28 +00:00
|
|
|
---
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: nfd-master
|
|
|
|
rules:
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- nodes
|
2020-03-05 14:40:55 +00:00
|
|
|
# when using command line flag --resource-labels to create extended resources
|
|
|
|
# you will need to uncomment "- nodes/status"
|
|
|
|
# - nodes/status
|
2019-01-11 13:55:28 +00:00
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- patch
|
|
|
|
- update
|
2020-10-01 14:09:33 +00:00
|
|
|
# List only needed for --prune
|
|
|
|
- list
|
2019-01-11 13:55:28 +00:00
|
|
|
---
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: nfd-master
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: ClusterRole
|
|
|
|
name: nfd-master
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: nfd-master
|
2019-05-28 14:13:52 +00:00
|
|
|
namespace: node-feature-discovery
|
2019-01-11 13:55:28 +00:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
2020-03-05 22:46:58 +00:00
|
|
|
kind: Deployment
|
2019-01-11 13:55:28 +00:00
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: nfd-master
|
|
|
|
name: nfd-master
|
2019-05-28 14:13:52 +00:00
|
|
|
namespace: node-feature-discovery
|
2019-01-11 13:55:28 +00:00
|
|
|
spec:
|
2020-03-05 22:46:58 +00:00
|
|
|
replicas: 1
|
2019-01-11 13:55:28 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: nfd-master
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: nfd-master
|
|
|
|
spec:
|
2019-01-23 08:15:47 +00:00
|
|
|
serviceAccount: nfd-master
|
2020-03-05 22:46:58 +00:00
|
|
|
affinity:
|
|
|
|
nodeAffinity:
|
|
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
- weight: 1
|
|
|
|
preference:
|
|
|
|
matchExpressions:
|
|
|
|
- key: "node-role.kubernetes.io/master"
|
|
|
|
operator: In
|
|
|
|
values: [""]
|
2019-01-11 13:55:28 +00:00
|
|
|
tolerations:
|
|
|
|
- key: "node-role.kubernetes.io/master"
|
|
|
|
operator: "Equal"
|
|
|
|
value: ""
|
|
|
|
effect: "NoSchedule"
|
|
|
|
containers:
|
|
|
|
- env:
|
|
|
|
- name: NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
2020-10-08 17:23:43 +00:00
|
|
|
image: gcr.io/k8s-staging-nfd/node-feature-discovery:master
|
2021-02-03 16:23:09 +00:00
|
|
|
imagePullPolicy: Always
|
2019-01-11 13:55:28 +00:00
|
|
|
name: nfd-master
|
2020-05-28 12:16:15 +00:00
|
|
|
securityContext:
|
|
|
|
allowPrivilegeEscalation: false
|
|
|
|
capabilities:
|
|
|
|
drop: ["ALL"]
|
|
|
|
readOnlyRootFilesystem: true
|
|
|
|
runAsNonRoot: true
|
2019-01-11 13:55:28 +00:00
|
|
|
command:
|
|
|
|
- "nfd-master"
|
2019-02-01 12:04:59 +00:00
|
|
|
## Enable TLS authentication
|
|
|
|
## The example below assumes having the root certificate named ca.crt stored in
|
|
|
|
## a ConfigMap named nfd-ca-cert, and, the TLS authentication credentials stored
|
|
|
|
## in a TLS Secret named nfd-master-cert.
|
|
|
|
## Additional hardening can be enabled by specifying --verify-node-name in
|
|
|
|
## args, in which case every nfd-worker requires a individual node-specific
|
|
|
|
## TLS certificate.
|
|
|
|
# args:
|
|
|
|
# - "--ca-file=/etc/kubernetes/node-feature-discovery/trust/ca.crt"
|
|
|
|
# - "--key-file=/etc/kubernetes/node-feature-discovery/certs/tls.key"
|
|
|
|
# - "--cert-file=/etc/kubernetes/node-feature-discovery/certs/tls.crt"
|
|
|
|
# volumeMounts:
|
|
|
|
# - name: nfd-ca-cert
|
|
|
|
# mountPath: "/etc/kubernetes/node-feature-discovery/trust"
|
|
|
|
# readOnly: true
|
|
|
|
# - name: nfd-master-cert
|
|
|
|
# mountPath: "/etc/kubernetes/node-feature-discovery/certs"
|
|
|
|
# readOnly: true
|
|
|
|
# volumes:
|
|
|
|
# - name: nfd-ca-cert
|
|
|
|
# configMap:
|
|
|
|
# name: nfd-ca-cert
|
|
|
|
# - name: nfd-master-cert
|
|
|
|
# secret:
|
|
|
|
# secretName: nfd-master-cert
|
2019-01-11 13:55:28 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: nfd-master
|
2019-05-28 14:13:52 +00:00
|
|
|
namespace: node-feature-discovery
|
2019-01-11 13:55:28 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: nfd-master
|
|
|
|
ports:
|
|
|
|
- protocol: TCP
|
|
|
|
port: 8080
|
|
|
|
type: ClusterIP
|