From a088de7333bf987d68e09328fb3388e8415c96d7 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Tue, 28 May 2024 19:58:04 +0300 Subject: [PATCH] deployment/helm: enable specifying additional cmdline args --- deployment/helm/node-feature-discovery/templates/master.yaml | 3 +++ deployment/helm/node-feature-discovery/templates/nfd-gc.yaml | 3 +++ .../node-feature-discovery/templates/topologyupdater.yaml | 3 +++ deployment/helm/node-feature-discovery/templates/worker.yaml | 3 +++ deployment/helm/node-feature-discovery/values.yaml | 4 ++++ docs/deployment/helm.md | 4 ++++ 6 files changed, 20 insertions(+) diff --git a/deployment/helm/node-feature-discovery/templates/master.yaml b/deployment/helm/node-feature-discovery/templates/master.yaml index 3a584209e..496a443f9 100644 --- a/deployment/helm/node-feature-discovery/templates/master.yaml +++ b/deployment/helm/node-feature-discovery/templates/master.yaml @@ -115,6 +115,9 @@ spec: - "-feature-gates={{ $key }}={{ $value }}" {{- end }} - "-metrics={{ .Values.master.metricsPort | default "8081" }}" + {{- with .Values.master.args }} + {{- toYaml . | nindent 12 }} + {{- end }} volumeMounts: {{- if .Values.tls.enable }} - name: nfd-master-cert diff --git a/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml b/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml index 4f4ac76c7..19dd4e192 100644 --- a/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml +++ b/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml @@ -53,6 +53,9 @@ spec: {{- if .Values.gc.interval | empty | not }} - "-gc-interval={{ .Values.gc.interval }}" {{- end }} + {{- with .Values.gc.args }} + {{- toYaml . | nindent 10 }} + {{- end }} resources: {{- toYaml .Values.gc.resources | nindent 12 }} securityContext: diff --git a/deployment/helm/node-feature-discovery/templates/topologyupdater.yaml b/deployment/helm/node-feature-discovery/templates/topologyupdater.yaml index 1221cfd2d..1fc32bbdb 100644 --- a/deployment/helm/node-feature-discovery/templates/topologyupdater.yaml +++ b/deployment/helm/node-feature-discovery/templates/topologyupdater.yaml @@ -91,6 +91,9 @@ spec: - "-kubelet-state-dir=" {{- end }} - -metrics={{ .Values.topologyUpdater.metricsPort | default "8081"}} + {{- with .Values.topologyUpdater.args }} + {{- toYaml . | nindent 10 }} + {{- end }} ports: - name: metrics containerPort: {{ .Values.topologyUpdater.metricsPort | default "8081"}} diff --git a/deployment/helm/node-feature-discovery/templates/worker.yaml b/deployment/helm/node-feature-discovery/templates/worker.yaml index f2a2419fc..d775debca 100644 --- a/deployment/helm/node-feature-discovery/templates/worker.yaml +++ b/deployment/helm/node-feature-discovery/templates/worker.yaml @@ -85,6 +85,9 @@ spec: - "-feature-gates={{ $key }}={{ $value }}" {{- end }} - "-metrics={{ .Values.worker.metricsPort | default "8081"}}" + {{- with .Values.gc.args }} + {{- toYaml . | nindent 8 }} + {{- end }} ports: - name: metrics containerPort: {{ .Values.worker.metricsPort | default "8081"}} diff --git a/deployment/helm/node-feature-discovery/values.yaml b/deployment/helm/node-feature-discovery/values.yaml index 7e52cc998..245e0b94c 100644 --- a/deployment/helm/node-feature-discovery/values.yaml +++ b/deployment/helm/node-feature-discovery/values.yaml @@ -20,6 +20,7 @@ priorityClassName: "" master: enable: true + args: [] config: ### # noPublish: false # autoDefaultNs: true @@ -142,6 +143,7 @@ master: worker: enable: true + args: [] config: ### #core: # labelWhiteList: @@ -460,6 +462,7 @@ topologyUpdater: ### enable: false + args: [] createCRDs: false serviceAccount: @@ -515,6 +518,7 @@ topologyUpdater: gc: enable: true + args: [] replicaCount: 1 serviceAccount: diff --git a/docs/deployment/helm.md b/docs/deployment/helm.md index 644a43769..c4047f412 100644 --- a/docs/deployment/helm.md +++ b/docs/deployment/helm.md @@ -143,6 +143,7 @@ API's you need to install the prometheus operator in your cluster. | `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) | +| `master.args` | array | [] | Additional [command line arguments](../reference/master-commandline-reference.md) to pass to nfd-master | ### Worker pod parameters @@ -166,6 +167,7 @@ API's you need to install the prometheus operator in your cluster. | `worker.priorityClassName` | string | | NFD worker pod [priority class](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/) | | `worker.annotations` | dict | {} | NFD worker pod [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) | | `worker.daemonsetAnnotations` | dict | {} | NFD worker daemonset [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) | +| `worker.args` | array | [] | Additional [command line arguments](../reference/worker-commandline-reference.md) to pass to nfd-worker | ### Topology updater parameters @@ -195,6 +197,7 @@ API's you need to install the prometheus operator in your cluster. | `topologyUpdater.config` | dict | | [configuration](../reference/topology-updater-configuration-reference) | | `topologyUpdater.podSetFingerprint` | bool | true | Enables compute and report of pod fingerprint in NRT objects. | | `topologyUpdater.kubeletStateDir` | string | /var/lib/kubelet | Specifies kubelet state directory path for watching state and checkpoint files. Empty value disables kubelet state tracking. | +| `topologyUpdater.args` | array | [] | Additional [command line arguments](../reference/topology-updater-commandline-reference.md) to pass to nfd-topology-updater | ### Garbage collector parameters @@ -216,6 +219,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.args` | array | [] | Additional [command line arguments](../reference/gc-commandline-reference.md) to pass to nfd-gc | [rbac]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/