Skip to content

Commit b361fd9

Browse files
authored
Merge pull request #80 from raffis/chore-1
v2.0.0 release chore
2 parents e172edc + 4e1f96e commit b361fd9

21 files changed

+61
-71
lines changed

.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ project_name: mongodb-query-exporter
22

33
builds:
44
- id: cli
5-
main: main.go
5+
main: cmd/root.go
66
binary: mongodb-query-exporter
77
goos:
88
- linux

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ vet:
5353

5454
build:
5555
@echo ">> building binaries"
56-
go build -o mongodb-query-exporter main.go
56+
go build -o mongodb-query-exporter cmd/root.go
5757

5858
.PHONY: run
5959
run: fmt vet
60-
go run ./main.go
60+
go run ./cmd/root.go
6161

6262
.PHONY: docker-build
6363
docker-build: test ## Build docker image with the manager.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Note that this is not designed to be a replacement for the [MongoDB exporter](ht
1818

1919
## Installation
2020

21-
Get Prometheus MongoDB aggregation query exporter, either as a [binary](https://github.com/raffis/mongodb-query-exporter/releases/tag/v1.0.0) from the latest release or packaged as a [Docker image](https://github.com/raffis/mongodb-query-exporter/pkgs/container/mongodb-query-exporter).
21+
Get Prometheus MongoDB aggregation query exporter, either as a binaray from the latest release or packaged as a [Docker image](https://github.com/raffis/mongodb-query-exporter/pkgs/container/mongodb-query-exporter).
2222

2323
### Helm Chart
2424
For kubernetes users there is an official helm chart for the MongoDB query exporter.
25-
Please read the installation instructions [here](https://github.com/raffis/mongodb-query-exporter/blob/master/chart/prometheus-mongodb-query-exporter/README.md).
25+
Please read the installation instructions [here](https://github.com/raffis/mongodb-query-exporter/blob/master/chart/mongodb-query-exporter/README.md).
2626

2727
## Usage
2828

chart/mongodb-query-exporter/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
appVersion: v1.0.0
2+
appVersion: v2.0.0
33
description: A Prometheus exporter for MongoDB custom aggregations
44
home: https://github.com/raffis/mongodb-query-exporter
55
maintainers:
@@ -12,7 +12,7 @@ keywords:
1212
- aggregation
1313
- query
1414
- prometheus
15-
name: prometheus-mongodb-query-exporter
15+
name: mongodb-query-exporter
1616
sources:
1717
- https://github.com/raffis/mongodb-query-exporter
1818
version: 2.1.0

chart/mongodb-query-exporter/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Prometheus MongoDB Exporter
1+
# MongoDB Exporter
22

33
Installs the [MongoDB Query Exporter](https://github.com/raffis/mongodb-query-exporter) for [Prometheus](https://prometheus.io/).
44

@@ -36,5 +36,5 @@ podAnnotations:
3636
See Customizing the Chart Before Installing. To see all configurable options with detailed comments, visit the chart's values.yaml, or run the configuration command:
3737
3838
```sh
39-
$ helm show values prometheus-mongodb-query-exporter/prometheus-mongodb-query-exporter
39+
$ helm show values oci://ghcr.io/raffis/charts/mongodb-query-exporter
4040
```

chart/mongodb-query-exporter/templates/_helpers.tpl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{/*
33
Expand the name of the chart.
44
*/}}
5-
{{- define "prometheus-mongodb-query-exporter.name" -}}
5+
{{- define "mongodb-query-exporter.name" -}}
66
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
77
{{- end -}}
88

@@ -11,7 +11,7 @@ Create a default fully qualified app name.
1111
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
1212
If release name contains chart name it will be used as a full name.
1313
*/}}
14-
{{- define "prometheus-mongodb-query-exporter.fullname" -}}
14+
{{- define "mongodb-query-exporter.fullname" -}}
1515
{{- if .Values.fullnameOverride -}}
1616
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
1717
{{- else -}}
@@ -27,16 +27,16 @@ If release name contains chart name it will be used as a full name.
2727
{{/*
2828
Create chart name and version as used by the chart label.
2929
*/}}
30-
{{- define "prometheus-mongodb-query-exporter.chart" -}}
30+
{{- define "mongodb-query-exporter.chart" -}}
3131
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
3232
{{- end -}}
3333

3434
{{/*
3535
Create the name of the service account to use
3636
*/}}
37-
{{- define "prometheus-mongodb-query-exporter.serviceAccountName" -}}
37+
{{- define "mongodb-query-exporter.serviceAccountName" -}}
3838
{{- if .Values.serviceAccount.create -}}
39-
{{ default (include "prometheus-mongodb-query-exporter.fullname" .) .Values.serviceAccount.name }}
39+
{{ default (include "mongodb-query-exporter.fullname" .) .Values.serviceAccount.name }}
4040
{{- else -}}
4141
{{ default "default" .Values.serviceAccount.name }}
4242
{{- end -}}
@@ -45,34 +45,34 @@ Create the name of the service account to use
4545
{{/*
4646
Determine secret name, can either be the self-created of an existing one
4747
*/}}
48-
{{- define "prometheus-mongodb-query-exporter.secretName" -}}
48+
{{- define "mongodb-query-exporter.secretName" -}}
4949
{{- if .Values.existingSecret.name -}}
5050
{{- .Values.existingSecret.name -}}
5151
{{- else -}}
52-
{{ include "prometheus-mongodb-query-exporter.fullname" . }}
52+
{{ include "mongodb-query-exporter.fullname" . }}
5353
{{- end -}}
5454
{{- end -}}
5555

5656
{{/*
5757
Determine configmap name, can either be the self-created of an existing one
5858
*/}}
59-
{{- define "prometheus-mongodb-query-exporter.configName" -}}
59+
{{- define "mongodb-query-exporter.configName" -}}
6060
{{- if .Values.existingConfig.name -}}
6161
{{- .Values.existingConfig.name -}}
6262
{{- else -}}
63-
{{ include "prometheus-mongodb-query-exporter.fullname" . }}
63+
{{ include "mongodb-query-exporter.fullname" . }}
6464
{{- end -}}
6565
{{- end -}}
6666

6767

6868
{{/*
6969
Common labels
7070
*/}}
71-
{{- define "prometheus-mongodb-query-exporter.labels" -}}{{- if .Values.chartLabels }}
72-
app.kubernetes.io/name: {{ include "prometheus-mongodb-query-exporter.name" . }}
71+
{{- define "mongodb-query-exporter.labels" -}}{{- if .Values.chartLabels }}
72+
app.kubernetes.io/name: {{ include "mongodb-query-exporter.name" . }}
7373
app.kubernetes.io/instance: {{ .Release.Name }}
7474
app.kubernetes.io/managed-by: {{ .Release.Service }}
75-
helm.sh/chart: {{ include "prometheus-mongodb-query-exporter.chart" . }}
75+
helm.sh/chart: {{ include "mongodb-query-exporter.chart" . }}
7676
{{- end -}}
7777
{{- with .Values.labels }}
7878
{{ . | toYaml }}

chart/mongodb-query-exporter/templates/configmap.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
apiVersion: v1
33
kind: ConfigMap
44
metadata:
5-
name: {{ include "prometheus-mongodb-query-exporter.configName" . }}
6-
{{- with ( include "prometheus-mongodb-query-exporter.labels" . ) }}
5+
name: {{ include "mongodb-query-exporter.configName" . }}
6+
{{- with ( include "mongodb-query-exporter.labels" . ) }}
77
labels:
88
{{- . }}
99
{{- end }}

chart/mongodb-query-exporter/templates/deployment.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
name: {{ include "prometheus-mongodb-query-exporter.fullname" . }}
5-
{{- with ( include "prometheus-mongodb-query-exporter.labels" . ) }}
4+
name: {{ include "mongodb-query-exporter.fullname" . }}
5+
{{- with ( include "mongodb-query-exporter.labels" . ) }}
66
labels:
77
{{- . }}
88
{{- end }}
@@ -14,7 +14,7 @@ spec:
1414
replicas: {{ .Values.replicas }}
1515
selector:
1616
matchLabels:
17-
app.kubernetes.io/name: {{ include "prometheus-mongodb-query-exporter.name" . }}
17+
app.kubernetes.io/name: {{ include "mongodb-query-exporter.name" . }}
1818
app.kubernetes.io/instance: {{ .Release.Name }}
1919
template:
2020
metadata:
@@ -25,15 +25,15 @@ spec:
2525
{{- toYaml .Values.podAnnotations | nindent 8 }}
2626
{{- end }}
2727
labels:
28-
app.kubernetes.io/name: {{ include "prometheus-mongodb-query-exporter.name" . }}
28+
app.kubernetes.io/name: {{ include "mongodb-query-exporter.name" . }}
2929
app.kubernetes.io/instance: {{ .Release.Name }}
3030
spec:
31-
serviceAccountName: {{ template "prometheus-mongodb-query-exporter.serviceAccountName" . }}
31+
serviceAccountName: {{ template "mongodb-query-exporter.serviceAccountName" . }}
3232
containers:
3333
- name: mongodb-query-exporter
3434
envFrom:
3535
- secretRef:
36-
name: {{ include "prometheus-mongodb-query-exporter.secretName" . }}
36+
name: {{ include "mongodb-query-exporter.secretName" . }}
3737
env:
3838
{{- if .Values.env }}
3939
{{- range $key, $value := .Values.env }}
@@ -95,7 +95,7 @@ spec:
9595
volumes:
9696
- name: config
9797
configMap:
98-
name: {{ include "prometheus-mongodb-query-exporter.configName" . }}
98+
name: {{ include "mongodb-query-exporter.configName" . }}
9999
{{- range .Values.secretMounts }}
100100
- name: {{ .name }}
101101
secret:

chart/mongodb-query-exporter/templates/podmonitor.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
apiVersion: monitoring.coreos.com/v1
33
kind: PodMonitor
44
metadata:
5-
name: {{ include "prometheus-mongodb-query-exporter.fullname" . }}
6-
{{- $labels := merge ( include "prometheus-mongodb-query-exporter.labels" . | fromYaml) .Values.podMonitor.labels -}}
5+
name: {{ include "mongodb-query-exporter.fullname" . }}
6+
{{- $labels := merge ( include "mongodb-query-exporter.labels" . | fromYaml) .Values.podMonitor.labels -}}
77
{{- with $labels }}
88
labels:
99
{{- toYaml . | nindent 4 }}
@@ -30,7 +30,7 @@ spec:
3030
- {{ .Release.Namespace }}
3131
selector:
3232
matchLabels:
33-
app.kubernetes.io/name: {{ include "prometheus-mongodb-query-exporter.name" . }}
33+
app.kubernetes.io/name: {{ include "mongodb-query-exporter.name" . }}
3434
app.kubernetes.io/instance: {{ .Release.Name }}
3535
{{- if .Values.podMonitor.targetLabels }}
3636
targetLabels:

chart/mongodb-query-exporter/templates/podsecuritypolicy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
apiVersion: policy/v1beta1
33
kind: PodSecurityPolicy
44
metadata:
5-
name: {{ template "prometheus-mongodb-query-exporter.fullname" . }}
6-
{{- with ( include "prometheus-mongodb-query-exporter.labels" . ) }}
5+
name: {{ template "mongodb-query-exporter.fullname" . }}
6+
{{- with ( include "mongodb-query-exporter.labels" . ) }}
77
labels:
88
{{- . }}
99
{{- end }}

0 commit comments

Comments
 (0)