From 016d40ff4fe7504b63eb8bb2b2b5d6a9ced2c35a Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Thu, 28 Nov 2019 12:29:08 +0530 Subject: [PATCH] update `resources` formatting Signed-off-by: Sameer Naik --- bitnami/node-exporter/README.md | 2 +- bitnami/node-exporter/templates/daemonset.yaml | 2 ++ bitnami/node-exporter/values-production.yaml | 14 ++++++++++++-- bitnami/node-exporter/values.yaml | 14 ++++++++++++-- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/bitnami/node-exporter/README.md b/bitnami/node-exporter/README.md index c69d0f21ff..c3ce83cf9e 100644 --- a/bitnami/node-exporter/README.md +++ b/bitnami/node-exporter/README.md @@ -86,7 +86,7 @@ The following table lists the configurable parameters of the Node Exporter chart | `hostNetwork` | Expose the service to the host network | `true` | | `minReadySeconds` | `minReadySeconds` to avoid killing pods before we are ready | `0` | | `priorityClassName` | Priority class assigned to the Pods | `nil` | -| `resources` | CPU/Memory resource requests/limits for node | `{}` | +| `resources` | Resource requests/limit | `{}` | | `podLabels` | Pod labels | `{}` | | `podAnnotations` | Pod annotations | `{}` | | `affinity` | Map of node/pod affinities | `{} (The value is evaluated as a template)` | diff --git a/bitnami/node-exporter/templates/daemonset.yaml b/bitnami/node-exporter/templates/daemonset.yaml index a3158c898e..2378b43da9 100644 --- a/bitnami/node-exporter/templates/daemonset.yaml +++ b/bitnami/node-exporter/templates/daemonset.yaml @@ -60,7 +60,9 @@ spec: path: / port: metrics {{ toYaml .Values.readinessProbe | indent 12 }} + {{- if .Values.resources }} resources: {{- toYaml .Values.resources | nindent 12 }} + {{- end }} volumeMounts: - name: proc mountPath: /host/proc diff --git a/bitnami/node-exporter/values-production.yaml b/bitnami/node-exporter/values-production.yaml index 3f7c2fd6f9..cfa64a3b34 100644 --- a/bitnami/node-exporter/values-production.yaml +++ b/bitnami/node-exporter/values-production.yaml @@ -137,10 +137,20 @@ minReadySeconds: 0 ## priorityClassName: "" -## Configure resource requests and limits +## Resource requests and limits ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ ## -resources: {} +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + limits: {} + # cpu: 100m + # memory: 128Mi + requests: {} + # cpu: 100m + # memory: 128Mi ## Pod labels ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ diff --git a/bitnami/node-exporter/values.yaml b/bitnami/node-exporter/values.yaml index 3f7c2fd6f9..cfa64a3b34 100644 --- a/bitnami/node-exporter/values.yaml +++ b/bitnami/node-exporter/values.yaml @@ -137,10 +137,20 @@ minReadySeconds: 0 ## priorityClassName: "" -## Configure resource requests and limits +## Resource requests and limits ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ ## -resources: {} +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + limits: {} + # cpu: 100m + # memory: 128Mi + requests: {} + # cpu: 100m + # memory: 128Mi ## Pod labels ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/