From 7809ce0e87cb6decad175822aa4f4b835ce12b99 Mon Sep 17 00:00:00 2001 From: lcavajani <33934779+lcavajani@users.noreply.github.com> Date: Mon, 24 Sep 2018 13:27:53 +0200 Subject: [PATCH] add option to configure hostNetwork/hostPID for node-exporter pods (#7643) Signed-off-by: Ludovic Cavajani update Chart version Signed-off-by: Ludovic Cavajani Resolve conflicts Signed-off-by: Ludovic Cavajani update prometheus chart to 7.1.3 Signed-off-by: Ludovic Cavajani --- stable/prometheus/Chart.yaml | 2 +- stable/prometheus/README.md | 2 ++ stable/prometheus/templates/node-exporter-daemonset.yaml | 4 ++++ stable/prometheus/values.yaml | 8 ++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/stable/prometheus/Chart.yaml b/stable/prometheus/Chart.yaml index 68609bfb14..12dc372f08 100755 --- a/stable/prometheus/Chart.yaml +++ b/stable/prometheus/Chart.yaml @@ -1,5 +1,5 @@ name: prometheus -version: 7.1.2 +version: 7.1.3 appVersion: 2.4.2 description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ diff --git a/stable/prometheus/README.md b/stable/prometheus/README.md index c41cf9a788..58227ef324 100644 --- a/stable/prometheus/README.md +++ b/stable/prometheus/README.md @@ -173,6 +173,8 @@ Parameter | Description | Default `nodeExporter.extraArgs` | Additional node-exporter container arguments | `{}` `nodeExporter.extraHostPathMounts` | Additional node-exporter hostPath mounts | `[]` `nodeExporter.extraConfigmapMounts` | Additional node-exporter configMap mounts | `[]` +`nodeExporter.hostNetwork` | If true, node-exporter pods share the host network namespace | `true` +`nodeExporter.hostPID` | If true, node-exporter pods share the host PID namespace | `true` `nodeExporter.nodeSelector` | node labels for node-exporter pod assignment | `{}` `nodeExporter.podAnnotations` | annotations to be added to node-exporter pods | `{}` `nodeExporter.pod.labels` | labels to be added to node-exporter pods | `{}` diff --git a/stable/prometheus/templates/node-exporter-daemonset.yaml b/stable/prometheus/templates/node-exporter-daemonset.yaml index 435bd09a28..96fae9586f 100644 --- a/stable/prometheus/templates/node-exporter-daemonset.yaml +++ b/stable/prometheus/templates/node-exporter-daemonset.yaml @@ -73,8 +73,12 @@ spec: mountPath: {{ .mountPath }} readOnly: {{ .readOnly }} {{- end }} + {{- if .Values.nodeExporter.hostNetwork }} hostNetwork: true + {{- end }} + {{- if .Values.nodeExporter.hostPID }} hostPID: true + {{- end }} {{- if .Values.nodeExporter.tolerations }} tolerations: {{ toYaml .Values.nodeExporter.tolerations | indent 8 }} diff --git a/stable/prometheus/values.yaml b/stable/prometheus/values.yaml index 98850c823f..e41267540e 100644 --- a/stable/prometheus/values.yaml +++ b/stable/prometheus/values.yaml @@ -347,6 +347,14 @@ nodeExporter: ## enabled: true + ## If true, node-exporter pods share the host network namespace + ## + hostNetwork: true + + ## If true, node-exporter pods share the host PID namespace + ## + hostPID: true + ## node-exporter container name ## name: node-exporter