From f8cdd3a3efd22b798d8d399e8749b94887784353 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Mon, 7 Jun 2021 22:58:39 -0700 Subject: [PATCH] Rebase to a05f7b8888d6174827b815aa097d64b94f00af3e (cherry picked from commit 6e32565f54389feda2f9e9677ffb63951ec85580) --- .../generated-changes/patch/Chart.yaml.patch | 6 ++++-- .../patch/templates/daemonset.yaml.patch | 10 ++++++++-- .../patch/templates/psp.yaml.patch | 13 +++++++++++++ .../generated-changes/patch/values.yaml.patch | 18 +++++++++++++++++- 4 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 packages/rancher-node-exporter/generated-changes/patch/templates/psp.yaml.patch diff --git a/packages/rancher-node-exporter/generated-changes/patch/Chart.yaml.patch b/packages/rancher-node-exporter/generated-changes/patch/Chart.yaml.patch index 7bab565d9..27ab0a306 100644 --- a/packages/rancher-node-exporter/generated-changes/patch/Chart.yaml.patch +++ b/packages/rancher-node-exporter/generated-changes/patch/Chart.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/Chart.yaml +++ charts/Chart.yaml -@@ -1,7 +1,13 @@ +@@ -1,8 +1,14 @@ +annotations: + catalog.rancher.io/certified: rancher + catalog.rancher.io/namespace: cattle-monitoring-system @@ -11,7 +11,9 @@ appVersion: 1.1.2 description: A Helm chart for prometheus node-exporter -name: prometheus-node-exporter +-version: 1.16.2 +name: rancher-node-exporter - version: 1.16.2 ++version: 1.18.1 home: https://github.com/prometheus/node_exporter/ sources: + - https://github.com/prometheus/node_exporter/ diff --git a/packages/rancher-node-exporter/generated-changes/patch/templates/daemonset.yaml.patch b/packages/rancher-node-exporter/generated-changes/patch/templates/daemonset.yaml.patch index ad9668dd3..fa5800969 100644 --- a/packages/rancher-node-exporter/generated-changes/patch/templates/daemonset.yaml.patch +++ b/packages/rancher-node-exporter/generated-changes/patch/templates/daemonset.yaml.patch @@ -1,7 +1,13 @@ --- charts-original/templates/daemonset.yaml +++ charts/templates/daemonset.yaml -@@ -31,7 +31,7 @@ +@@ -29,9 +29,13 @@ + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} {{- end }} ++ {{- if .Values.extraInitContainers }} ++ initContainers: ++ {{ toYaml .Values.extraInitContainers | nindent 6 }} ++ {{- end }} containers: - name: node-exporter - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" @@ -9,7 +15,7 @@ imagePullPolicy: {{ .Values.image.pullPolicy }} args: - --path.procfs=/host/proc -@@ -129,18 +129,18 @@ +@@ -129,18 +133,18 @@ affinity: {{ toYaml .Values.affinity | indent 8 }} {{- end }} diff --git a/packages/rancher-node-exporter/generated-changes/patch/templates/psp.yaml.patch b/packages/rancher-node-exporter/generated-changes/patch/templates/psp.yaml.patch new file mode 100644 index 000000000..21ae32226 --- /dev/null +++ b/packages/rancher-node-exporter/generated-changes/patch/templates/psp.yaml.patch @@ -0,0 +1,13 @@ +--- charts-original/templates/psp.yaml ++++ charts/templates/psp.yaml +@@ -6,6 +6,10 @@ + name: {{ template "prometheus-node-exporter.fullname" . }} + namespace: {{ template "prometheus-node-exporter.namespace" . }} + labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }} ++{{- if .Values.rbac.pspAnnotations }} ++ annotations: ++{{ toYaml .Values.rbac.pspAnnotations | indent 4 }} ++{{- end}} + spec: + privileged: false + # Required to prevent escalations to root. diff --git a/packages/rancher-node-exporter/generated-changes/patch/values.yaml.patch b/packages/rancher-node-exporter/generated-changes/patch/values.yaml.patch index 07cdd90d3..78e8588e9 100644 --- a/packages/rancher-node-exporter/generated-changes/patch/values.yaml.patch +++ b/packages/rancher-node-exporter/generated-changes/patch/values.yaml.patch @@ -15,7 +15,15 @@ tag: v1.1.2 pullPolicy: IfNotPresent -@@ -125,6 +130,8 @@ +@@ -72,6 +77,7 @@ + ## If true, create & use Pod Security Policy resources + ## https://kubernetes.io/docs/concepts/policy/pod-security-policy/ + pspEnabled: true ++ pspAnnotations: {} + + # for deployments that have node_exporter deployed outside of the cluster, list + # their addresses here +@@ -125,6 +131,8 @@ tolerations: - effect: NoSchedule operator: Exists @@ -24,3 +32,11 @@ ## Assign a PriorityClassName to pods if set # priorityClassName: "" +@@ -168,3 +176,7 @@ + ## - name: collector-textfiles + ## mountPath: /run/prometheus + ## readOnly: false ++ ++## Additional InitContainers to initialize the pod ++## ++extraInitContainers: []