From 906fa2d6020b5fd7160934e4297a7a6783828713 Mon Sep 17 00:00:00 2001 From: yccharles <50130457+yccharles@users.noreply.github.com> Date: Sun, 29 May 2022 15:18:51 +0800 Subject: [PATCH] (feature):add priorityClassName to daemonset (#104) Co-authored-by: yangchao --- charts/cadvisor/Chart.yaml | 2 +- charts/cadvisor/README.md | 1 + charts/cadvisor/templates/daemonset.yaml | 3 +++ charts/cadvisor/values.yaml | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/cadvisor/Chart.yaml b/charts/cadvisor/Chart.yaml index e695244..c59f5cb 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.1.0 +version: 2.2.0 appVersion: 0.44.1 home: https://github.com/google/cadvisor sources: diff --git a/charts/cadvisor/README.md b/charts/cadvisor/README.md index 9405dd5..9434fc4 100644 --- a/charts/cadvisor/README.md +++ b/charts/cadvisor/README.md @@ -61,6 +61,7 @@ The following table lists the configurable parameters of the cAdvisor chart and | `serviceAccount.create` | create a own serviceAccount for the pod | `true` | | `serviceAccount.name` | name of the serviceAccount to create | `""` | | `podAnnotations` | annotations for the daemonset pods | `{}` | +| `priorityClassName` | priority classes name for the pod | `{}` | | `podSecurityPolicy.create` | create a own PodSecurityPolicy for the pod | `false` | | `podSecurityPolicy.privileged` | create the PodSecurityPolicy as privileged | `false` | | `podSecurityContext.create` | create the podSecurityContext in container spec | `false` | diff --git a/charts/cadvisor/templates/daemonset.yaml b/charts/cadvisor/templates/daemonset.yaml index 6d761fd..550a951 100644 --- a/charts/cadvisor/templates/daemonset.yaml +++ b/charts/cadvisor/templates/daemonset.yaml @@ -24,6 +24,9 @@ spec: {{ $key }}: {{ $value | quote }} {{- end }} spec: + {{ if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} + {{- end }} {{ if .Values.image.pullSecrets }} imagePullSecrets: {{- range .Values.image.pullSecrets }} diff --git a/charts/cadvisor/values.yaml b/charts/cadvisor/values.yaml index 2884a6d..e5924dc 100644 --- a/charts/cadvisor/values.yaml +++ b/charts/cadvisor/values.yaml @@ -44,6 +44,9 @@ resources: {} podAnnotations: {} +# priorityClassName: system-cluster-critical +priorityClassName: {} + # sometimes errors are encountered when using the cpu load reader without being on the host network hostNetwork: false