Skip to content

Commit

Permalink
Add support for master and garbage collector pod topology spread cons…
Browse files Browse the repository at this point in the history
…traints

Signed-off-by: Fred Heinecke <[email protected]>
  • Loading branch information
solidDoWant committed Nov 11, 2024
1 parent 5947f8d commit 6c60901
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deployment/helm/node-feature-discovery/templates/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,8 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.master.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions deployment/helm/node-feature-discovery/templates/nfd-gc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,8 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.gc.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions deployment/helm/node-feature-discovery/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ master:
- key: "node-role.kubernetes.io/control-plane"
operator: In
values: [""]

topologySpreadConstraints: []

livenessProbe:
grpc:
Expand Down Expand Up @@ -588,6 +590,7 @@ gc:
annotations: {}
deploymentAnnotations: {}
affinity: {}
topologySpreadConstraints: []

# specify how many old ReplicaSets for the Deployment to retain.
revisionHistoryLimit:
Expand Down
2 changes: 2 additions & 0 deletions docs/deployment/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ API's you need to install the prometheus operator in your cluster.
| `master.tolerations` | dict | _Schedule to control-plane node_ | NFD master pod [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) |
| `master.annotations` | dict | {} | NFD master pod [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) |
| `master.affinity` | dict | | NFD master pod required [node affinity](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/) |
| `master.topologySpreadConstraints` | array | [] | NFD master pod [topology spread constraints](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/) |
| `master.deploymentAnnotations` | dict | {} | NFD master deployment [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) |
| `master.nfdApiParallelism` | integer | 10 | Specifies the maximum number of concurrent node updates. |
| `master.config` | dict | | NFD master [configuration](../reference/master-configuration-reference) |
Expand Down Expand Up @@ -323,6 +324,7 @@ API's you need to install the prometheus operator in your cluster.
| `gc.annotations` | dict | {} | Garbage collector pod [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) |
| `gc.deploymentAnnotations` | dict | {} | Garbage collector deployment [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) |
| `gc.affinity` | dict | {} | Garbage collector pod [affinity](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/) |
| `gc.topologySpreadConstraints` | array | [] | Garbage collector pod [topology spread constraints](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/) |
| `gc.extraArgs` | array | [] | Additional [command line arguments](../reference/gc-commandline-reference.md) to pass to nfd-gc |
| `gc.extraEnvs` | array | [] | Additional environment variables to pass to nfd-gc |
| `gc.revisionHistoryLimit` | integer | | Specify how many old ReplicaSets for this Deployment you want to retain. [revisionHistoryLimit](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#revision-history-limit) |
Expand Down

0 comments on commit 6c60901

Please sign in to comment.