From 2f0b9d1d49fe5df950c8ffa7c030d774ca9ffb65 Mon Sep 17 00:00:00 2001 From: Matt Ray Date: Tue, 17 Oct 2023 16:46:15 +1100 Subject: [PATCH] Updated with recommendations from review and latest OpenCost release Signed-off-by: Matt Ray --- .github/CODEOWNERS | 1 + charts/prometheus-opencost-exporter/Chart.yaml | 4 ++-- .../templates/_helpers.tpl | 12 ++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 769861f91535..779f19796dc8 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -32,6 +32,7 @@ /charts/prometheus-nats-exporter/ @caarlos0 @okgolove /charts/prometheus-nginx-exporter/ @nlamirault @zeritti /charts/prometheus-node-exporter/ @gianrubio @zanhsieh @zeritti +/charts/prometheus-opencost-exporter/ @mattray /charts/prometheus-operator-admission-webhook/ @zeritti /charts/prometheus-operator-crds/ @dacamposol @desaintmartin @jkroepke @QuentinBisson /charts/prometheus-pgbouncer-exporter/ @stewartshea @zeritti diff --git a/charts/prometheus-opencost-exporter/Chart.yaml b/charts/prometheus-opencost-exporter/Chart.yaml index 33959c77cb92..f98d3fca66ac 100644 --- a/charts/prometheus-opencost-exporter/Chart.yaml +++ b/charts/prometheus-opencost-exporter/Chart.yaml @@ -1,7 +1,7 @@ -appVersion: 1.106.2 +appVersion: 1.106.3 version: 0.1.0 description: Prometheus OpenCost Exporter -home: https://github.com/prometheus-community/opencost_exporter +home: https://github.com/opencost/opencost-helm-chart name: prometheus-opencost-exporter sources: - https://github.com/prometheus-community/opencost_exporter diff --git a/charts/prometheus-opencost-exporter/templates/_helpers.tpl b/charts/prometheus-opencost-exporter/templates/_helpers.tpl index 63edafc64bcc..6eea1847b5c5 100644 --- a/charts/prometheus-opencost-exporter/templates/_helpers.tpl +++ b/charts/prometheus-opencost-exporter/templates/_helpers.tpl @@ -35,20 +35,20 @@ Create chart name and version as used by the chart label. Common labels */}} {{- define "prometheus-opencost-exporter.labels" -}} -chart: {{ include "prometheus-opencost-exporter.chart" . }} +helm.sh/chart: {{ include "prometheus-opencost-exporter.chart" . }} {{ include "prometheus-opencost-exporter.selectorLabels" . }} -heritage: {{ .Release.Service }} -{{- if .Values.commonLabels}} -{{ toYaml .Values.commonLabels }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end }} {{/* Selector labels */}} {{- define "prometheus-opencost-exporter.selectorLabels" -}} -app: {{ include "prometheus-opencost-exporter.name" . }} -release: {{ .Release.Name }} +app.kubernetes.io/name: {{ include "prometheus-opencost-exporter.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{/*