Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: sql-exporter
description: Database-agnostic SQL exporter for Prometheus
type: application
version: 0.13.5
version: 0.14.0
appVersion: 0.18.6
keywords:
- exporter
Expand Down
4 changes: 3 additions & 1 deletion helm/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# sql-exporter

![Version: 0.13.5](https://img.shields.io/badge/Version-0.13.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.18.6](https://img.shields.io/badge/AppVersion-0.18.6-informational?style=flat-square)
![Version: 0.14.0](https://img.shields.io/badge/Version-0.14.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.18.6](https://img.shields.io/badge/AppVersion-0.18.6-informational?style=flat-square)

Database-agnostic SQL exporter for Prometheus

Expand Down Expand Up @@ -52,6 +52,8 @@ as an example.
|-----|------|---------|-------------|
| nameOverride | string | `""` | Provide a name in place of `sql-exporter` |
| fullnameOverride | string | `""` | String to fully override "sql-exporter.fullname" |
| commonLabels | object | `{}` | Common labels to add to all deployed resources |
| commonAnnotations | object | `{}` | Common annotations to add to all the deployed resources |
| image.repository | string | `"burningalchemist/sql_exporter"` | Image repository |
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| image.tag | string | `appVersion` value from `Chart.yaml` | Image tag |
Expand Down
12 changes: 12 additions & 0 deletions helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ helm.sh/chart: {{ include "sql-exporter.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.commonLabels }}
{{ toYaml .Values.commonLabels }}
{{- end }}
{{- end }}

{{/*
Expand All @@ -61,6 +64,15 @@ app.kubernetes.io/name: {{ include "sql-exporter.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Common annotations
*/}}
{{- define "sql-exporter.annotations" -}}
{{- if .Values.commonAnnotations }}
{{ toYaml .Values.commonAnnotations }}
{{- end }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
Expand Down
2 changes: 2 additions & 0 deletions helm/templates/configmap.collectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
name: {{ include "sql-exporter.fullname" . }}
labels:
{{- include "sql-exporter.labels" . | nindent 4 }}
annotations:
{{- include "sql-exporter.annotations" . | nindent 4 }}
data:
{{- range $k, $v := .Values.collectorFiles }}
{{ $k }}: |-
Expand Down
2 changes: 2 additions & 0 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ metadata:
name: {{ include "sql-exporter.fullname" . }}
labels:
{{- include "sql-exporter.labels" . | nindent 4 }}
annotations:
{{- include "sql-exporter.annotations" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand Down
7 changes: 4 additions & 3 deletions helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ metadata:
{{- with .Values.ingress.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- include "sql-exporter.annotations" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName }}
Expand Down
2 changes: 2 additions & 0 deletions helm/templates/secret.configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
name: {{ include "sql-exporter.fullname" . }}
labels:
{{- include "sql-exporter.labels" . | nindent 4 }}
annotations:
{{- include "sql-exporter.annotations" . | nindent 4 }}
type: Opaque
stringData:
sql_exporter.yml: |-
Expand Down
2 changes: 2 additions & 0 deletions helm/templates/secret.tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
name: {{ include "sql-exporter.tls.name" . }}
labels:
{{- include "sql-exporter.labels" . | nindent 4 }}
annotations:
{{- include "sql-exporter.annotations" . | nindent 4 }}
type: Opaque
data:
tls.crt: {{ (tpl (.Values.ingress.tls.crt | required "crt is required if you want to create tls secret.") .) | required "crt is required if you want to create tls secret." | b64enc | quote }}
Expand Down
7 changes: 4 additions & 3 deletions helm/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ metadata:
{{- with .Values.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- include "sql-exporter.annotations" . | nindent 4 }}
{{- with .Values.service.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
Expand Down
13 changes: 7 additions & 6 deletions helm/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "sql-exporter.fullname" . }}
{{- with .Values.serviceAccount.annotations}}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "sql-exporter.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.labels }}
{{- toYaml . | nindent 4 }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- include "sql-exporter.annotations" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations}}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- include "sql-exporter.labels" . | nindent 4 }}
automountServiceAccountToken: {{ default "false" .Values.serviceAccount.automountServiceAccountToken }}
{{- end }}
2 changes: 2 additions & 0 deletions helm/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ metadata:
{{- range $key, $value := .Values.serviceMonitor.selector }}
{{ $key }}: {{ $value | quote }}
{{- end }}
annotations:
{{- include "sql-exporter.annotations" . | nindent 4 }}
spec:
selector:
matchLabels:
Expand Down
4 changes: 4 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
nameOverride: ""
# -- String to fully override "sql-exporter.fullname"
fullnameOverride: ""
# -- Common labels to add to all deployed resources
commonLabels: {}
# -- Common annotations to add to all the deployed resources
commonAnnotations: {}
image:
# -- Image repository
repository: burningalchemist/sql_exporter
Expand Down
Loading