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 chart/mongodb-query-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ keywords:
name: mongodb-query-exporter
sources:
- https://github.com/raffis/mongodb-query-exporter
version: 4.0.0
version: 4.0.1
15 changes: 8 additions & 7 deletions chart/mongodb-query-exporter/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,14 @@ Determine configmap name, can either be the self-created of an existing one
{{/*
Common labels
*/}}
{{- define "mongodb-query-exporter.labels" -}}{{- if .Values.chartLabels }}
app.kubernetes.io/name: {{ include "mongodb-query-exporter.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "mongodb-query-exporter.chart" . }}
{{- define "mongodb-query-exporter.labels" -}}
{{ if .Values.chartLabels -}}
app.kubernetes.io/name: {{ include "mongodb-query-exporter.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "mongodb-query-exporter.chart" . }}
{{- end -}}
{{- with .Values.labels }}
{{ . | toYaml }}
{{ if .Values.labels }}
{{ toYaml .Values.labels }}
{{- end -}}
{{- end -}}
5 changes: 1 addition & 4 deletions chart/mongodb-query-exporter/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "mongodb-query-exporter.configName" . }}
{{- with ( include "mongodb-query-exporter.labels" . ) }}
labels:
{{- . }}
{{- end }}
labels: {{- include "mongodb-query-exporter.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
5 changes: 1 addition & 4 deletions chart/mongodb-query-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "mongodb-query-exporter.fullname" . }}
{{- with ( include "mongodb-query-exporter.labels" . ) }}
labels:
{{- . }}
{{- end }}
labels: {{- include "mongodb-query-exporter.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
6 changes: 1 addition & 5 deletions chart/mongodb-query-exporter/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ include "mongodb-query-exporter.fullname" . }}
{{- $labels := merge ( include "mongodb-query-exporter.labels" . | fromYaml) .Values.podMonitor.labels -}}
{{- with $labels }}
labels:
{{- toYaml . | nindent 4 }}
{{- end }}
labels: {{- merge ( include "mongodb-query-exporter.labels" . | fromYaml) .Values.podMonitor.labels | toYaml | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ kind: PrometheusRule
metadata:
metadata:
name: {{ template "mongodb-query-exporter.fullname" . }}
{{- $labels := merge ( include "mongodb-query-exporter.labels" . | fromYaml) .Values.prometheusRule.labels -}}
{{- with $labels }}
labels:
{{- toYaml . | nindent 4 }}
{{- end }}
labels: {{- merge ( include "mongodb-query-exporter.labels" . | fromYaml) .Values.prometheusRule.labels | toYaml | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
5 changes: 1 addition & 4 deletions chart/mongodb-query-exporter/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ include "mongodb-query-exporter.secretName" . }}
{{- with ( include "mongodb-query-exporter.labels" . ) }}
labels:
{{- . }}
{{- end }}
labels: {{- include "mongodb-query-exporter.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
6 changes: 1 addition & 5 deletions chart/mongodb-query-exporter/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "mongodb-query-exporter.fullname" . }}
{{- $labels := merge ( include "mongodb-query-exporter.labels" . | fromYaml) .Values.service.labels -}}
{{- with $labels }}
labels:
{{- toYaml . | nindent 4 }}
{{- end }}
labels: {{- merge ( include "mongodb-query-exporter.labels" . | fromYaml) .Values.service.labels | toYaml | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "mongodb-query-exporter.serviceAccountName" . }}
{{- with ( include "mongodb-query-exporter.labels" . ) }}
labels:
{{- . }}
{{- end }}
labels: {{- include "mongodb-query-exporter.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "mongodb-query-exporter.fullname" . }}
{{- $labels := merge ( include "mongodb-query-exporter.labels" . | fromYaml) .Values.serviceMonitor.labels -}}
{{- with $labels }}
labels:
{{- toYaml . | nindent 4 }}
{{- end }}
labels: {{- merge ( include "mongodb-query-exporter.labels" . | fromYaml) .Values.serviceMonitor.labels | toYaml | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down