From 99d6dc0385a7d668b13c16ebd4759aaef3451c41 Mon Sep 17 00:00:00 2001 From: Andrey Date: Sat, 4 Nov 2023 09:18:27 +0100 Subject: [PATCH] Allow to configure access mode of the host paths (#165) * CentOS, Fedora and RHEL: allow to configure access mode of the host paths * Add docs related to RHEL configuration * bump new chart version --- charts/cadvisor/Chart.yaml | 2 +- charts/cadvisor/README.md | 3 +++ charts/cadvisor/templates/daemonset.yaml | 2 +- charts/cadvisor/values.yaml | 5 +++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/charts/cadvisor/Chart.yaml b/charts/cadvisor/Chart.yaml index c2e0378..ea54566 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: 2.3.0 +version: 2.3.1 appVersion: 0.47.0 home: https://github.com/google/cadvisor sources: diff --git a/charts/cadvisor/README.md b/charts/cadvisor/README.md index 443e678..3c6f675 100644 --- a/charts/cadvisor/README.md +++ b/charts/cadvisor/README.md @@ -89,3 +89,6 @@ $ helm install --name my-release -f values.yaml ckotzbauer/cadvisor ``` > **Tip**: You can use the default [values.yaml](values.yaml) + +## Centos, Fedora and RHEL +You may need to run the container with additional configuration. Please see [this article](https://github.com/google/cadvisor/blob/master/docs/running.md#centos-fedora-and-rhel). \ No newline at end of file diff --git a/charts/cadvisor/templates/daemonset.yaml b/charts/cadvisor/templates/daemonset.yaml index 38d7875..4627506 100644 --- a/charts/cadvisor/templates/daemonset.yaml +++ b/charts/cadvisor/templates/daemonset.yaml @@ -53,7 +53,7 @@ spec: {{- range .Values.container.hostPaths }} - name: {{ .name }} mountPath: {{ default .path .mount }} - readOnly: true + readOnly: {{ list nil true | has .readOnly }} {{- end }} {{ if .Values.podSecurityContext.create }} securityContext: diff --git a/charts/cadvisor/values.yaml b/charts/cadvisor/values.yaml index dbe52b8..eb1e409 100644 --- a/charts/cadvisor/values.yaml +++ b/charts/cadvisor/values.yaml @@ -21,14 +21,19 @@ container: - name: rootfs path: "/" mount: "/rootfs" + readOnly: true - name: varrun path: "/var/run" + readOnly: true - name: sys path: "/sys" + readOnly: true - name: docker path: "/var/lib/docker" + readOnly: true - name: disk path: "/dev/disk" + readOnly: true resources: {} # We usually recommend not to specify default resources and to leave this as a conscious