diff --git a/deployment/overlays/prune/kustomization.yaml b/deployment/overlays/prune/kustomization.yaml new file mode 100644 index 000000000..e9410c21b --- /dev/null +++ b/deployment/overlays/prune/kustomization.yaml @@ -0,0 +1,20 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: node-feature-discovery + +bases: +- ../../base/rbac + +resources: +- namespace.yaml +- master-job.yaml + +components: +- ../../components/common + +patches: +- path: master-clusterrole.yaml + target: + kind: ClusterRole + name: nfd-master diff --git a/deployment/overlays/prune/master-clusterrole.yaml b/deployment/overlays/prune/master-clusterrole.yaml new file mode 100644 index 000000000..cb8caec48 --- /dev/null +++ b/deployment/overlays/prune/master-clusterrole.yaml @@ -0,0 +1,3 @@ +- op: add + path: "/rules/0/verbs/-" + value: "list" diff --git a/deployment/overlays/prune/master-job.yaml b/deployment/overlays/prune/master-job.yaml new file mode 100644 index 000000000..9ea1c24d3 --- /dev/null +++ b/deployment/overlays/prune/master-job.yaml @@ -0,0 +1,25 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: nfd-master + labels: + app: nfd +spec: + completions: 1 + template: + metadata: + labels: + app: nfd-prune + spec: + serviceAccount: nfd-master + tolerations: [] + containers: + - name: nfd-master + image: gcr.io/k8s-staging-nfd/node-feature-discovery:master + imagePullPolicy: Always + command: + - "nfd-master" + args: + - "--prune" + restartPolicy: Never + diff --git a/deployment/overlays/prune/namespace.yaml b/deployment/overlays/prune/namespace.yaml new file mode 100644 index 000000000..8e54de2e3 --- /dev/null +++ b/deployment/overlays/prune/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: node-feature-discovery