Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prometheus-snmp-exporter] Add extraVolumes support and passing auth param #4043

Merged
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
4 changes: 2 additions & 2 deletions charts/prometheus-snmp-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
description: Prometheus SNMP Exporter
name: prometheus-snmp-exporter
version: 2.1.0
appVersion: v0.21.0
version: 3.0.0
appVersion: v0.24.1
home: https://github.com/prometheus/snmp_exporter
sources:
- https://github.com/prometheus/snmp_exporter
Expand Down
5 changes: 5 additions & 0 deletions charts/prometheus-snmp-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ serviceMonitor:

This version changes the `serviceMonitor.namespace` value from `monitoring` to the namespace the release is deployed to.

### To 3.0.0

This version upgrades snmp-exporter version to 0.24.1, which introduces breaking change to configuration format.
See [Module and Auth Split Migration](https://github.com/prometheus/snmp_exporter/blob/main/auth-split-migration.md) for more details.

## Configuration

See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands:
Expand Down
6 changes: 6 additions & 0 deletions charts/prometheus-snmp-exporter/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ spec:
subPath: {{ .subPath }}
readOnly: {{ .readOnly }}
{{- end }}
{{- with .Values.extraVolumeMounts }}
{{ toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.config }}
- name: configmap-reload
image: "{{ .Values.configmapReload.image.repository }}:{{ .Values.configmapReload.image.tag }}"
Expand Down Expand Up @@ -112,4 +115,7 @@ spec:
secretName: {{ .secretName }}
defaultMode: {{ .defaultMode }}
{{- end }}
{{- with .Values.extraVolumes }}
{{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/prometheus-snmp-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ spec:
subPath: {{ .subPath }}
readOnly: {{ .readOnly }}
{{- end }}
{{- with .Values.extraVolumeMounts }}
{{ toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.config }}
- name: configmap-reload
image: "{{ .Values.configmapReload.image.repository }}:{{ .Values.configmapReload.image.tag }}"
Expand Down Expand Up @@ -119,4 +122,7 @@ spec:
secretName: {{ .secretName }}
defaultMode: {{ .defaultMode }}
{{- end }}
{{- with .Values.extraVolumes }}
{{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ spec:
module: {{ .module | default $.Values.serviceMonitor.module }}
target:
- {{ .target }}
{{ if .auth }}
auth: {{ .auth }}
{{- end }}
metricRelabelings:
- sourceLabels: [instance]
targetLabel: instance
Expand Down
9 changes: 9 additions & 0 deletions charts/prometheus-snmp-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ extraSecretMounts: []
# readOnly: true
# defaultMode: 420

# Additional volumes, e.g. for secrets used in an extraContainer
extraVolumes: []

# Additional volume mounts for snmp-exporter container
extraVolumeMounts: []

## For RBAC support:
rbac:
# Specifies whether RBAC resources should be created
Expand Down Expand Up @@ -187,6 +193,9 @@ serviceMonitor:
# Module used for scraping. Overrides value set in serviceMonitor.module
# module:
# - if_mib
# Auth used for scraping.
# auth:
# - test-auth
# Map of labels for ServiceMonitor. Overrides value set in serviceMonitor.selector
# labels: {}
# release: kube-prometheus-stack
Expand Down
Loading