From 920306cba8bb1b9cc06b26313ccdf6e02da95561 Mon Sep 17 00:00:00 2001 From: Omer Aplatony Date: Thu, 11 Jul 2024 15:39:49 +0300 Subject: [PATCH] Add revision history limit for master replica and for garbage collector Signed-off-by: Omer Aplatony --- .../helm/node-feature-discovery/templates/master.yaml | 1 + .../helm/node-feature-discovery/templates/nfd-gc.yaml | 1 + deployment/helm/node-feature-discovery/values.yaml | 6 ++++++ docs/deployment/helm.md | 6 ++++-- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/deployment/helm/node-feature-discovery/templates/master.yaml b/deployment/helm/node-feature-discovery/templates/master.yaml index 496a443f9..a61ce9874 100644 --- a/deployment/helm/node-feature-discovery/templates/master.yaml +++ b/deployment/helm/node-feature-discovery/templates/master.yaml @@ -13,6 +13,7 @@ metadata: {{- end }} spec: replicas: {{ .Values.master.replicaCount }} + revisionHistoryLimit: {{ .Values.master.revisionHistoryLimit }} selector: matchLabels: {{- include "node-feature-discovery.selectorLabels" . | nindent 6 }} diff --git a/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml b/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml index 19dd4e192..182e51aa8 100644 --- a/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml +++ b/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml @@ -13,6 +13,7 @@ metadata: {{- end }} spec: replicas: {{ .Values.gc.replicaCount | default 1 }} + revisionHistoryLimit: {{ .Values.gc.revisionHistoryLimit }} selector: matchLabels: {{- include "node-feature-discovery.selectorLabels" . | nindent 6 }} diff --git a/deployment/helm/node-feature-discovery/values.yaml b/deployment/helm/node-feature-discovery/values.yaml index e3574ac23..b313f20e1 100644 --- a/deployment/helm/node-feature-discovery/values.yaml +++ b/deployment/helm/node-feature-discovery/values.yaml @@ -90,6 +90,9 @@ master: # The name of the service account to use. # If not set and create is true, a name is generated using the fullname template name: + + # specify how many old ReplicaSets for the Deployment to retain. + revisionHistoryLimit: rbac: create: true @@ -544,6 +547,9 @@ gc: deploymentAnnotations: {} affinity: {} + # specify how many old ReplicaSets for the Deployment to retain. + revisionHistoryLimit: + # Optionally use encryption for worker <--> master comms # TODO: verify hostname is not yet supported # diff --git a/docs/deployment/helm.md b/docs/deployment/helm.md index 2c56e0e54..ed5e15dd7 100644 --- a/docs/deployment/helm.md +++ b/docs/deployment/helm.md @@ -144,6 +144,7 @@ API's you need to install the prometheus operator in your cluster. | `master.nfdApiParallelism` | integer | 10 | Specifies the maximum number of concurrent node updates. | | `master.config` | dict | | NFD master [configuration](../reference/master-configuration-reference) | | `master.args` | array | [] | Additional [command line arguments](../reference/master-commandline-reference.md) to pass to nfd-master | +| `master.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) | ### Worker pod parameters @@ -217,9 +218,10 @@ API's you need to install the prometheus operator in your cluster. | `gc.nodeSelector` | dict | {} | Garbage collector pod [node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) | | `gc.tolerations` | dict | {} | Garbage collector pod [node tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) | | `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.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.args` | array | [] | Additional [command line arguments](../reference/gc-commandline-reference.md) to pass to nfd-gc | +| `gc.args` | array | [] | Additional [command line arguments](../reference/gc-commandline-reference.md) 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) | [rbac]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/