From 75f0a14f2adb367975a26733f9d3f74fdcb9af1d Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Thu, 15 Feb 2024 12:16:46 +0100 Subject: [PATCH] helm: add priorityClassName option Signed-off-by: Carlos Eduardo Arango Gutierrez --- deployment/helm/node-feature-discovery/templates/master.yaml | 3 +++ deployment/helm/node-feature-discovery/templates/nfd-gc.yaml | 3 +++ .../helm/node-feature-discovery/templates/topologyupdater.yaml | 3 +++ deployment/helm/node-feature-discovery/templates/worker.yaml | 3 +++ deployment/helm/node-feature-discovery/values.yaml | 2 ++ docs/deployment/helm.md | 1 + 6 files changed, 15 insertions(+) diff --git a/deployment/helm/node-feature-discovery/templates/master.yaml b/deployment/helm/node-feature-discovery/templates/master.yaml index 422261be6..e60e7be61 100644 --- a/deployment/helm/node-feature-discovery/templates/master.yaml +++ b/deployment/helm/node-feature-discovery/templates/master.yaml @@ -27,6 +27,9 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: + {{- with .Values.priorityClassName }} + priorityClassName: {{ . }} + {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml b/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml index 1e0e12327..20979ed8c 100644 --- a/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml +++ b/deployment/helm/node-feature-discovery/templates/nfd-gc.yaml @@ -29,6 +29,9 @@ spec: spec: serviceAccountName: {{ include "node-feature-discovery.gc.serviceAccountName" . }} dnsPolicy: ClusterFirstWithHostNet + {{- with .Values.priorityClassName }} + priorityClassName: {{ . }} + {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/deployment/helm/node-feature-discovery/templates/topologyupdater.yaml b/deployment/helm/node-feature-discovery/templates/topologyupdater.yaml index 51ee6095a..af62107f9 100644 --- a/deployment/helm/node-feature-discovery/templates/topologyupdater.yaml +++ b/deployment/helm/node-feature-discovery/templates/topologyupdater.yaml @@ -28,6 +28,9 @@ spec: spec: serviceAccountName: {{ include "node-feature-discovery.topologyUpdater.serviceAccountName" . }} dnsPolicy: ClusterFirstWithHostNet + {{- with .Values.priorityClassName }} + priorityClassName: {{ . }} + {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/deployment/helm/node-feature-discovery/templates/worker.yaml b/deployment/helm/node-feature-discovery/templates/worker.yaml index f49f9bd64..cfb8b8425 100644 --- a/deployment/helm/node-feature-discovery/templates/worker.yaml +++ b/deployment/helm/node-feature-discovery/templates/worker.yaml @@ -27,6 +27,9 @@ spec: {{- end }} spec: dnsPolicy: ClusterFirstWithHostNet + {{- with .Values.priorityClassName }} + priorityClassName: {{ . }} + {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/deployment/helm/node-feature-discovery/values.yaml b/deployment/helm/node-feature-discovery/values.yaml index 8cfaf7f86..d2b3f8acb 100644 --- a/deployment/helm/node-feature-discovery/values.yaml +++ b/deployment/helm/node-feature-discovery/values.yaml @@ -12,6 +12,8 @@ namespaceOverride: "" enableNodeFeatureApi: true +priorityClassName: "" + master: enable: true config: ### diff --git a/docs/deployment/helm.md b/docs/deployment/helm.md index 2ef570408..ecd1f167e 100644 --- a/docs/deployment/helm.md +++ b/docs/deployment/helm.md @@ -99,6 +99,7 @@ Chart parameters are available. | `enableNodeFeatureApi`| bool | true | Enable the [NodeFeature](../usage/custom-resources.md#nodefeature) CRD API for communicating node features. This will automatically disable the gRPC communication. **NOTE**: this parameter is related to the deprecated gRPC API and will be removed with it in a future release | | `prometheus.enable` | bool | false | Specifies whether to expose metrics using prometheus operator | | `prometheus.labels` | dict | {} | Specifies labels for use with the prometheus operator to control how it is selected | +| `priorityClassName` | string | | The name of the PriorityClass to be used for the NFD pods. | Metrics are configured to be exposed using prometheus operator API's by default. If you want to expose metrics using the prometheus operator