From e15568d1d78ce7e27748ecf197961daeba266dd7 Mon Sep 17 00:00:00 2001 From: David Garson Date: Wed, 5 Aug 2020 23:13:39 -0700 Subject: [PATCH] Adds support for overriding the hostNetwork property in the daemonset template spec, which allows use of the cpu load reader in situations where you otherwise encounter an error --- charts/cadvisor/Chart.yaml | 2 +- charts/cadvisor/templates/daemonset.yaml | 3 +++ charts/cadvisor/values.yaml | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/cadvisor/Chart.yaml b/charts/cadvisor/Chart.yaml index 4f98553..99b3d62 100644 --- a/charts/cadvisor/Chart.yaml +++ b/charts/cadvisor/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: A chart for a Cadvisor deployment name: cadvisor -version: 1.1.2 +version: 1.1.3 appVersion: 0.36.0 home: https://github.com/google/cadvisor sources: diff --git a/charts/cadvisor/templates/daemonset.yaml b/charts/cadvisor/templates/daemonset.yaml index 1f1c64e..9609b03 100644 --- a/charts/cadvisor/templates/daemonset.yaml +++ b/charts/cadvisor/templates/daemonset.yaml @@ -25,6 +25,9 @@ spec: {{- end }} spec: serviceAccountName: {{ template "cadvisor.serviceAccountName" . }} + {{ if .Values.hostNetwork }} + hostNetwork: true + {{- end }} containers: - name: {{ template "cadvisor.name" . }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/charts/cadvisor/values.yaml b/charts/cadvisor/values.yaml index c8d8607..9b97ea8 100644 --- a/charts/cadvisor/values.yaml +++ b/charts/cadvisor/values.yaml @@ -39,6 +39,9 @@ resources: {} podAnnotations: {} +# sometimes errors are encountered when using the cpu load reader without being on the host network +hostNetwork: false + serviceAccount: # Specifies whether a service account should be created create: true