Skip to content

Commit

Permalink
add extraArgs and extraEnv parameters (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
bueti authored Aug 3, 2023
1 parent 4d404b5 commit 056f72f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/metrics-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: metrics-exporter
version: 1.1.3
version: 1.2.0
appVersion: "0.5"
description: This Chart installs and configures agnostic metrics exporter for
sql servers
Expand All @@ -14,7 +14,7 @@ keywords:
- sql_server
annotations:
artifacthub.io/changes: |
- Add subPath to config mount
- Add extraArgs and extraEnvs to allow custom configuration
artifacthub.io/images: |
- name: free/sql_exporter
image: githubfree/sql_exporter:0.5
4 changes: 3 additions & 1 deletion charts/metrics-exporter/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# metrics-exporter

![Version: 1.1.3](https://img.shields.io/badge/Version-1.1.3-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.2.0](https://img.shields.io/badge/Version-1.2.0-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.

Expand All @@ -18,6 +18,8 @@ Simply add this Chart repository to Helm:
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| config | object | `{"sqlexporter":{}}` | Set a exporter configuration |
| extraArgs | list | `[]` | Define additional arguments |
| extraEnvs | list | `[]` | Define additional environment variables |
| extraVolumeMounts | list | `[]` | Configure additional volumeMounts |
| extraVolumes | list | `[]` | Configure additional volumes |
| image.pullPolicy | string | `"IfNotPresent"` | Set an image pull policy |
Expand Down
7 changes: 7 additions & 0 deletions charts/metrics-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.extraEnvs }}
env:
{{ toYaml . | indent 12 }}
{{- end }}
args:
- -config.file=/config/sql_exporter.yaml
{{- with .Values.extraArgs }}
{{ toYaml . | indent 12 }}
{{- end }}
ports:
- name: metrics
containerPort: {{ get .Values.podAnnotations "prometheus.io/port" }}
Expand Down
8 changes: 7 additions & 1 deletion charts/metrics-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ service:
type: ClusterIP
port: 80


# -- Set a exporter resources
resources:
limits:
Expand All @@ -59,5 +58,12 @@ config:

# -- Configure additional volumes
extraVolumes: []

# -- Configure additional volumeMounts
extraVolumeMounts: []

# -- Define additional environment variables
extraEnvs: []

# -- Define additional arguments
extraArgs: []

0 comments on commit 056f72f

Please sign in to comment.