From d7db6278844f2190a5e5a06fd44df6c844ff826d Mon Sep 17 00:00:00 2001 From: joshmeranda Date: Thu, 5 Oct 2023 20:32:10 -0400 Subject: [PATCH] Update rancher-monitoring/rancher-node-exporter to new base 766bdf70dd19d4ddc80b0a4a7e785bf85b405c05 --- .../generated-changes/patch/Chart.yaml.patch | 33 +++++++++++-------- .../patch/templates/NOTES.txt.patch | 4 ++- .../patch/templates/daemonset.yaml.patch | 25 ++------------ .../patch/templates/endpoints.yaml.patch | 2 +- .../templates/psp-clusterrole.yaml.patch | 7 ++-- .../psp-clusterrolebinding.yaml.patch | 7 ++-- .../patch/templates/psp.yaml.patch | 7 ++-- .../patch/templates/servicemonitor.yaml.patch | 11 ++++--- .../generated-changes/patch/values.yaml.patch | 32 +++++++++++------- .../rancher-node-exporter/package.yaml | 2 +- 10 files changed, 61 insertions(+), 69 deletions(-) diff --git a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/Chart.yaml.patch b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/Chart.yaml.patch index 85542eb83..20f906434 100644 --- a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/Chart.yaml.patch +++ b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/Chart.yaml.patch @@ -1,22 +1,27 @@ --- charts-original/Chart.yaml +++ charts/Chart.yaml -@@ -1,3 +1,10 @@ -+annotations: -+ catalog.cattle.io/hidden: "true" -+ catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.27.0-0' -+ catalog.cattle.io/os: linux -+ catalog.rancher.io/certified: rancher -+ catalog.rancher.io/namespace: cattle-monitoring-system -+ catalog.rancher.io/release-name: rancher-node-exporter - apiVersion: v2 - appVersion: 1.3.1 - description: A Helm chart for prometheus node-exporter -@@ -11,7 +18,7 @@ +@@ -3,14 +3,8 @@ + artifacthub.io/links: | + - name: Chart Source + url: https://github.com/prometheus-community/helm-charts +-apiVersion: v2 + appVersion: 1.6.0 +-description: A Helm chart for prometheus node-exporter + home: https://github.com/prometheus/node_exporter/ +-keywords: +-- node-exporter +-- prometheus +-- exporter + maintainers: + - email: gianrubio@gmail.com name: gianrubio - - email: zanhsieh@gmail.com +@@ -18,8 +12,7 @@ name: zanhsieh + - email: rootsandtrees@posteo.de + name: zeritti -name: prometheus-node-exporter +name: rancher-node-exporter sources: - https://github.com/prometheus/node_exporter/ - type: application +-type: application + version: 4.20.0 diff --git a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/NOTES.txt.patch b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/NOTES.txt.patch index f02269a56..0912f82c9 100644 --- a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/NOTES.txt.patch +++ b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/NOTES.txt.patch @@ -1,6 +1,6 @@ --- charts-original/templates/NOTES.txt +++ charts/templates/NOTES.txt -@@ -10,6 +10,6 @@ +@@ -10,8 +10,8 @@ echo http://$SERVICE_IP:{{ .Values.service.port }} {{- else if contains "ClusterIP" .Values.service.type }} export POD_NAME=$(kubectl get pods --namespace {{ template "prometheus-node-exporter.namespace" . }} -l "app.kubernetes.io/name={{ template "prometheus-node-exporter.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") @@ -9,3 +9,5 @@ + echo "Visit http://127.0.0.1:{{ .Values.service.port }} to use your application" + kubectl port-forward --namespace {{ template "prometheus-node-exporter.namespace" . }} $POD_NAME {{ .Values.service.port }} {{- end }} + + {{- if .Values.kubeRBACProxy.enabled}} diff --git a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/daemonset.yaml.patch b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/daemonset.yaml.patch index 785472947..20e5e896b 100644 --- a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/daemonset.yaml.patch +++ b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/daemonset.yaml.patch @@ -1,32 +1,11 @@ --- charts-original/templates/daemonset.yaml +++ charts/templates/daemonset.yaml -@@ -35,7 +35,7 @@ - {{- end }} +@@ -42,7 +42,7 @@ containers: + {{- $servicePort := ternary 8100 .Values.service.port .Values.kubeRBACProxy.enabled }} - name: node-exporter - image: {{ include "prometheus-node-exporter.image" . }} + image: {{ template "system_default_registry" . }}{{ include "prometheus-node-exporter.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} args: - --path.procfs=/host/proc -@@ -177,14 +177,14 @@ - dnsConfig: - {{ toYaml . | indent 8 }} - {{- end }} -+ nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} - {{- if .Values.nodeSelector }} -- nodeSelector: --{{ toYaml .Values.nodeSelector | indent 8 }} -+{{- toYaml .Values.nodeSelector | nindent 8 }} - {{- end }} -- {{- with .Values.tolerations }} -- tolerations: --{{ toYaml . | indent 8 }} -- {{- end }} -+ tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} -+{{- if .Values.tolerations }} -+{{- toYaml .Values.tolerations | nindent 8 }} -+{{- end }} - volumes: - - name: proc - hostPath: diff --git a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/endpoints.yaml.patch b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/endpoints.yaml.patch index ddd3332a9..69e3b2015 100644 --- a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/endpoints.yaml.patch +++ b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/endpoints.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/endpoints.yaml +++ charts/templates/endpoints.yaml -@@ -12,6 +12,6 @@ +@@ -13,6 +13,6 @@ {{- end }} ports: - name: {{ .Values.service.portName }} diff --git a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/psp-clusterrole.yaml.patch b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/psp-clusterrole.yaml.patch index 772c2b14b..69a7e2617 100644 --- a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/psp-clusterrole.yaml.patch +++ b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/psp-clusterrole.yaml.patch @@ -1,9 +1,8 @@ --- charts-original/templates/psp-clusterrole.yaml +++ charts/templates/psp-clusterrole.yaml -@@ -1,5 +1,5 @@ - {{- if .Values.rbac.create }} --{{- if .Values.rbac.pspEnabled }} -+{{- if .Values.global.cattle.psp.enabled }} +@@ -1,4 +1,4 @@ +-{{- if and .Values.rbac.create .Values.rbac.pspEnabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }} ++{{- if and (or .Values.global.cattle.psp.enable (.Values.rbac.create .Values.rbac.pspEnabled)) (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }} kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: diff --git a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/psp-clusterrolebinding.yaml.patch b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/psp-clusterrolebinding.yaml.patch index 6eda9d4cc..b2176c46f 100644 --- a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/psp-clusterrolebinding.yaml.patch +++ b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/psp-clusterrolebinding.yaml.patch @@ -1,9 +1,8 @@ --- charts-original/templates/psp-clusterrolebinding.yaml +++ charts/templates/psp-clusterrolebinding.yaml -@@ -1,5 +1,5 @@ - {{- if .Values.rbac.create }} --{{- if .Values.rbac.pspEnabled }} -+{{- if .Values.global.cattle.psp.enabled }} +@@ -1,4 +1,4 @@ +-{{- if and .Values.rbac.create .Values.rbac.pspEnabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }} ++{{- if and (or .Values.global.cattle.psp.enable (and .Values.rbac.create .Values.rbac.pspEnabled)) (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: diff --git a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/psp.yaml.patch b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/psp.yaml.patch index 25d912061..047ebd2ef 100644 --- a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/psp.yaml.patch +++ b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/psp.yaml.patch @@ -1,9 +1,8 @@ --- charts-original/templates/psp.yaml +++ charts/templates/psp.yaml -@@ -1,5 +1,5 @@ - {{- if .Values.rbac.create }} --{{- if .Values.rbac.pspEnabled }} -+{{- if .Values.global.cattle.psp.enabled }} +@@ -1,4 +1,4 @@ +-{{- if and .Values.rbac.create .Values.rbac.pspEnabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }} ++{{- if and (or .Values.global.cattle.psp.enable (and .Values.rbac.create .Values.rbac.pspEnabled)) (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }} apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: diff --git a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/servicemonitor.yaml.patch b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/servicemonitor.yaml.patch index 71eddf836..94e94777c 100644 --- a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/servicemonitor.yaml.patch +++ b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/templates/servicemonitor.yaml.patch @@ -1,13 +1,14 @@ --- charts-original/templates/servicemonitor.yaml +++ charts/templates/servicemonitor.yaml -@@ -44,8 +44,18 @@ +@@ -53,9 +53,19 @@ + {{- with .Values.prometheus.monitor.relabelings }} relabelings: {{- toYaml . | nindent 8 }} - {{- end }} -- {{- with .Values.prometheus.monitor.metricRelabelings }} +- {{- end }} +- {{- with .Values.prometheus.monitor.metricRelabelings }} ++ {{- end }} metricRelabelings: - {{- toYaml . | nindent 8 }} -- {{- end }} + {{- with .Values.prometheus.monitor.metricRelabelings }} + {{- toYaml . | nindent 8 }} + {{- end }} @@ -20,5 +21,5 @@ + - sourceLabels: [__address__] + targetLabel: cluster_name + replacement: {{ .Values.global.cattle.clusterName }} -+ {{- end }} + {{- end }} {{- end }} diff --git a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/values.yaml.patch b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/values.yaml.patch index 3d12876ce..40cfddec0 100644 --- a/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/values.yaml.patch +++ b/packages/rancher-monitoring/rancher-node-exporter/generated-changes/patch/values.yaml.patch @@ -1,26 +1,34 @@ --- charts-original/values.yaml +++ charts/values.yaml -@@ -1,10 +1,17 @@ +@@ -1,11 +1,12 @@ # Default values for prometheus-node-exporter. # This is a YAML-formatted file. # Declare variables to be passed into your templates. -+ -+global: -+ cattle: -+ psp: -+ enabled: false -+ systemDefaultRegistry: "" + image: -- repository: quay.io/prometheus/node-exporter +- registry: quay.io +- repository: prometheus/node-exporter ++ registry: docker.io + repository: rancher/mirrored-prometheus-node-exporter # Overrides the image tag whose default is {{ printf "v%s" .Chart.AppVersion }} - tag: "" + tag: v1.3.1 pullPolicy: IfNotPresent - sha: "" + digest: "" -@@ -13,8 +20,8 @@ +@@ -15,6 +16,11 @@ + fullnameOverride: "" + + global: ++ cattle: ++ psp: ++ enable: true ++ systemDefaultRegistry: "" ++ + # To help compatibility with other charts which use global.imagePullSecrets. + # Allow either an array of {name: pullSecret} maps (k8s-style), or an array of strings (more common helm-style). + # global: +@@ -66,8 +72,8 @@ service: type: ClusterIP @@ -31,7 +39,7 @@ nodePort: portName: metrics listenOnAllInterfaces: true -@@ -95,9 +102,6 @@ +@@ -276,9 +282,6 @@ ## If true, create & use RBAC resources ## create: true @@ -41,7 +49,7 @@ pspAnnotations: {} # for deployments that have node_exporter deployed outside of the cluster, list -@@ -164,6 +168,8 @@ +@@ -348,6 +351,8 @@ tolerations: - effect: NoSchedule operator: Exists diff --git a/packages/rancher-monitoring/rancher-node-exporter/package.yaml b/packages/rancher-monitoring/rancher-node-exporter/package.yaml index 125ace4a0..48665769d 100644 --- a/packages/rancher-monitoring/rancher-node-exporter/package.yaml +++ b/packages/rancher-monitoring/rancher-node-exporter/package.yaml @@ -1,5 +1,5 @@ url: https://github.com/prometheus-community/helm-charts.git subdirectory: charts/prometheus-node-exporter -commit: 059e3a6e6b4ba0fd8614763de0f8e24937a89a39 +commit: 766bdf70dd19d4ddc80b0a4a7e785bf85b405c05 version: 103.0.0 doNotRelease: true