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-ipmi-exporter] Optionally pull config from a Secret #4536

Merged
merged 1 commit into from
Jun 7, 2024
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 charts/prometheus-ipmi-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: This is an IPMI exporter for Prometheus.

type: application

version: 0.3.0
version: 0.4.0

appVersion: "v1.8.0"

Expand Down
2 changes: 1 addition & 1 deletion charts/prometheus-ipmi-exporter/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if not .Values.configMapFile -}}
yankcrime marked this conversation as resolved.
Show resolved Hide resolved
{{- if not .Values.configSecret.enabled -}}
{{- $fullName := include "prometheus-ipmi-exporter.fullname" . -}}
apiVersion: v1
kind: ConfigMap
Expand Down
8 changes: 8 additions & 0 deletions charts/prometheus-ipmi-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,16 @@ spec:
memory: {{ .Values.resources.requests.memory }}
volumes:
- name: config-volume
{{- if .Values.configSecret.enabled }}
secret:
secretName: {{ .Values.configSecret.name }}
items:
- key: {{ .Values.configSecret.key }}
path: config.yml
{{- else }}
configMap:
name: {{ template "prometheus-ipmi-exporter.fullname" . }}
{{- end }}
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions charts/prometheus-ipmi-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ serviceMonitor:

# Configuration file for ipmi_exporter

configSecret:
enabled: false
name: ipmi-secret
key: config.yml

# This is an example config for scraping remote hosts via IPMI.
# Information required to access remote IPMI interfaces can be supplied in the
# 'modules' section. A scrape can request the usage of a given config by
Expand Down