From 62576441e918f1a094782f328c0dccd4ff04d620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=BCtikofer?= Date: Thu, 3 Aug 2023 08:58:53 +0200 Subject: [PATCH] Add Service to metrics-exporter (#77) --- charts/metrics-exporter/Chart.yaml | 4 ++-- charts/metrics-exporter/README.md | 2 +- .../metrics-exporter/templates/service.yaml | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 charts/metrics-exporter/templates/service.yaml diff --git a/charts/metrics-exporter/Chart.yaml b/charts/metrics-exporter/Chart.yaml index 35ae21a..3819ae4 100644 --- a/charts/metrics-exporter/Chart.yaml +++ b/charts/metrics-exporter/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: metrics-exporter -version: 1.1.1 +version: 1.1.2 appVersion: "0.5" description: This Chart installs and configures agnostic metrics exporter for sql servers @@ -14,7 +14,7 @@ keywords: - sql_server annotations: artifacthub.io/changes: | - - [internal] New Build Process + - Added Service artifacthub.io/images: | - name: free/sql_exporter image: githubfree/sql_exporter:0.5 diff --git a/charts/metrics-exporter/README.md b/charts/metrics-exporter/README.md index 11ff396..c6b5a1d 100644 --- a/charts/metrics-exporter/README.md +++ b/charts/metrics-exporter/README.md @@ -1,6 +1,6 @@ # metrics-exporter -![Version: 1.1.1](https://img.shields.io/badge/Version-1.1.1-informational?style=flat-square) ![AppVersion: 0.5](https://img.shields.io/badge/AppVersion-0.5-informational?style=flat-square) ![Release Status](https://github.com/ricardo-ch/helm-charts/workflows/Release%20Charts/badge.svg) [![License](https://img.shields.io/github/license/ricardo-ch/helm-charts)](https://github.com/ricardo-ch/helm-charts/blob/main/LICENSE) +![Version: 1.1.2](https://img.shields.io/badge/Version-1.1.2-informational?style=flat-square) ![AppVersion: 0.5](https://img.shields.io/badge/AppVersion-0.5-informational?style=flat-square) ![Release Status](https://github.com/ricardo-ch/helm-charts/workflows/Release%20Charts/badge.svg) [![License](https://img.shields.io/github/license/ricardo-ch/helm-charts)](https://github.com/ricardo-ch/helm-charts/blob/main/LICENSE) This chart installs [the DBMS agnostic metrics exporter](https://github.com/free/sql_exporter) based on SQL queries. diff --git a/charts/metrics-exporter/templates/service.yaml b/charts/metrics-exporter/templates/service.yaml new file mode 100644 index 0000000..d8ff21e --- /dev/null +++ b/charts/metrics-exporter/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "sqlserver-prometheus-exporter.fullname" . }} + labels: + app: {{ template "sqlserver-prometheus-exporter.name" . }} + chart: {{ template "sqlserver-prometheus-exporter.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + - name: http + port: {{ .Values.service.port }} + protocol: TCP + targetPort: 9399 + selector: + {{- include "sqlserver-prometheus-exporter.selectorLabels" . | nindent 4 }} + sessionAffinity: None + type: {{ .Values.service.type }}