From c6386abc8f9f7b143bfddfa05f45ec9f9ae9095d Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Wed, 15 Apr 2020 10:54:51 +0200 Subject: [PATCH] [metricbeat] nit * add metricbeat/charts to .helmignore * reorder some values * improve values description --- metricbeat/.helmignore | 1 + metricbeat/README.md | 6 ++++-- metricbeat/templates/daemonset.yaml | 2 +- metricbeat/values.yaml | 8 +++----- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/metricbeat/.helmignore b/metricbeat/.helmignore index e12c0b4b9..52eb71625 100644 --- a/metricbeat/.helmignore +++ b/metricbeat/.helmignore @@ -1,2 +1,3 @@ tests/ .pytest_cache/ +charts/ diff --git a/metricbeat/README.md b/metricbeat/README.md index 13427cccd..11d373b15 100644 --- a/metricbeat/README.md +++ b/metricbeat/README.md @@ -70,10 +70,12 @@ helm install --name metricbeat elastic/metricbeat --set imageTag=7.6.2 | `daemonset.affinity` | Configurable [affinity][] for Metricbeat `DaemonSet`. | `{}` | | `daemonset.metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml` for Metricbeat `DaemonSet`. | see [values.yaml][] | | `daemonset.nodeSelector` | Configurable [nodeSelector][] for Metricbeat `DaemonSet`. | `{}` | +| `daemonset.resources` | Allows you to set the [resources][] for Metricbeat `DaemonSet`. | `requests.cpu: 100m`
`requests.memory: 100Mi`
`limits.cpu: 1000m`
`limits.memory: 200Mi` | | `daemonset.tolerations` | Configurable [tolerations][] for Metricbeat `DaemonSet`. | `[]` | | `deployment.affinity` | Configurable [affinity][] for Metricbeat `Deployment`. | `{}` | | `deployment.metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml` for Metricbeat `Deployment`. | see [values.yaml][] | | `deployment.nodeSelector` | Configurable [nodeSelector][] for Metricbeat `Deployment`. | `{}` | +| `deployment.resources` | Allows you to set the [resources][] for Metricbeat `Deployment`. | `requests.cpu: 100m`
`requests.memory: 100Mi`
`limits.cpu: 1000m`
`limits.memory: 200Mi` | | `deployment.tolerations` | Configurable [tolerations][] for Metricbeat `Deployment`. | `[]` | | `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | | `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | @@ -104,9 +106,9 @@ helm install --name metricbeat elastic/metricbeat --set imageTag=7.6.2 ### Deprecated | Parameter | Description | Default | | --- | --- | --- | -| `affinity` | Configurable [affinity][] | `{}` | +| `affinity` | Configurable [affinity][] for Metricbeat `DaemonSet`. | `{}` | | `metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml` for both Metricbeat `DaemonSet` and `Deployment`. | see [values.yaml][] | -| `nodeSelector` | Configurable [nodeSelector][] | `{}` | +| `nodeSelector` | Configurable [nodeSelector][] for Metricbeat `DaemonSet`. | `{}` | | `resources` | Allows you to set the [resources][] for both Metricbeat `DaemonSet` and `Deployment`. | `requests.cpu: 100m`
`requests.memory: 100Mi`
`limits.cpu: 1000m`
`limits.memory: 200Mi` | | `tolerations` | Configurable [tolerations][] for both Metricbeat `DaemonSet` and `Deployment`. | `[]` | diff --git a/metricbeat/templates/daemonset.yaml b/metricbeat/templates/daemonset.yaml index c97117030..a82948c58 100644 --- a/metricbeat/templates/daemonset.yaml +++ b/metricbeat/templates/daemonset.yaml @@ -38,12 +38,12 @@ spec: {{ $key }}: {{ $value | quote }} {{- end }} spec: + affinity: {{ toYaml ( .Values.affinity | default .Values.daemonset.affinity ) | nindent 8 }} nodeSelector: {{ toYaml ( .Values.nodeSelector | default .Values.daemonset.nodeSelector ) | nindent 8 }} tolerations: {{ toYaml ( .Values.tolerations | default .Values.daemonset.tolerations ) | nindent 8 }} {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} - affinity: {{ toYaml ( .Values.affinity | default .Values.daemonset.affinity ) | nindent 8 }} serviceAccountName: {{ template "metricbeat.serviceAccount" . }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriod }} volumes: diff --git a/metricbeat/values.yaml b/metricbeat/values.yaml index 465920f79..38799dd87 100755 --- a/metricbeat/values.yaml +++ b/metricbeat/values.yaml @@ -91,11 +91,6 @@ deployment: memory: "200Mi" tolerations: [] -# DEPRECATED -# Allows you to add any config files in /usr/share/metricbeat -# such as metricbeat.yml for both daemonset and deployment -metricbeatConfig: {} - # Replicas being used for the kube-state-metrics metricbeat deployment replicas: 1 @@ -230,6 +225,9 @@ fullnameOverride: "" # DEPRECATED affinity: {} +# Allows you to add any config files in /usr/share/metricbeat +# such as metricbeat.yml for both daemonset and deployment +metricbeatConfig: {} nodeSelector: {} resources: {} tolerations: []