Skip to content

Commit

Permalink
fix(influxdb): pass boolean conf values as is to configmap
Browse files Browse the repository at this point in the history
Signed-off-by: Hugo Cortes <[email protected]>
  • Loading branch information
hugocortes authored and rawkode committed Mar 9, 2020
1 parent 3307474 commit c22d19f
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/influxdb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: influxdb
version: 4.3.5
version: 4.3.6
appVersion: 1.7.10
description: Scalable datastore for metrics, events, and real-time analytics.
keywords:
Expand Down
70 changes: 70 additions & 0 deletions charts/influxdb/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ data:
[meta]
dir = "/var/lib/influxdb/meta"
{{- range $key, $value := index .Values.config.meta }}
{{- $tp := typeOf $value }}
{{- if eq $tp "string" }}
{{ $key }} = {{ $value | quote }}
{{- else }}
{{ $key }} = {{ $value }}
{{- end }}
{{- end }}
{{- if .Values.enterprise.enabled }}
Expand All @@ -24,44 +29,84 @@ data:
dir = "/var/lib/influxdb/data"
wal-dir = "/var/lib/influxdb/wal"
{{- range $key, $value := index .Values.config.data }}
{{- $tp := typeOf $value }}
{{- if eq $tp "string" }}
{{ $key }} = {{ $value | quote }}
{{- else }}
{{ $key }} = {{ $value }}
{{- end }}
{{- end }}
[coordinator]
{{- range $key, $value := index .Values.config.coordinator }}
{{- $tp := typeOf $value }}
{{- if eq $tp "string" }}
{{ $key }} = {{ $value | quote }}
{{- else }}
{{ $key }} = {{ $value }}
{{- end }}
{{- end }}
[retention]
{{- range $key, $value := index .Values.config.retention }}
{{- $tp := typeOf $value }}
{{- if eq $tp "string" }}
{{ $key }} = {{ $value | quote }}
{{- else }}
{{ $key }} = {{ $value }}
{{- end }}
{{- end }}
[shard-precreation]
{{- range $key, $value := index .Values.config.shard_precreation }}
{{- $tp := typeOf $value }}
{{- if eq $tp "string" }}
{{ $key }} = {{ $value | quote }}
{{- else }}
{{ $key }} = {{ $value }}
{{- end }}
{{- end }}
[monitor]
{{- range $key, $value := index .Values.config.monitor }}
{{- $tp := typeOf $value }}
{{- if eq $tp "string" }}
{{ $key }} = {{ $value | quote }}
{{- else }}
{{ $key }} = {{ $value }}
{{- end }}
{{- end }}
[subscriber]
{{- range $key, $value := index .Values.config.subscriber }}
{{- $tp := typeOf $value }}
{{- if eq $tp "string" }}
{{ $key }} = {{ $value | quote }}
{{- else }}
{{ $key }} = {{ $value }}
{{- end }}
{{- end }}
[http]
{{- range $key, $value := index .Values.config.http }}
{{- $tp := typeOf $value }}
{{- if eq $tp "string" }}
{{ $key }} = {{ $value | quote }}
{{- else }}
{{ $key }} = {{ $value }}
{{- end }}
{{- end }}
# TODO: allow multiple graphite listeners
[[graphite]]
{{- range $key, $value := index .Values.config.graphite }}
{{- $tp := typeOf $value }}
{{- if eq $tp "string" }}
{{ $key }} = {{ $value | quote }}
{{- else }}
{{ $key }} = {{ $value }}
{{- end }}
{{- end }}
{{- if .Values.config.graphite.templates }}
templates = [
Expand All @@ -75,31 +120,56 @@ data:
[[collectd]]
{{- range $key, $value := index .Values.config.collectd }}
{{- $tp := typeOf $value }}
{{- if eq $tp "string" }}
{{ $key }} = {{ $value | quote }}
{{- else }}
{{ $key }} = {{ $value }}
{{- end }}
{{- end }}
# TODO: allow multiple opentsdb listeners with templates
[[opentsdb]]
{{- range $key, $value := index .Values.config.opentsdb }}
{{- $tp := typeOf $value }}
{{- if eq $tp "string" }}
{{ $key }} = {{ $value | quote }}
{{- else }}
{{ $key }} = {{ $value }}
{{- end }}
{{- end }}
# TODO: allow multiple udp listeners with templates
[[udp]]
{{- range $key, $value := index .Values.config.udp }}
{{- $tp := typeOf $value }}
{{- if eq $tp "string" }}
{{ $key }} = {{ $value | quote }}
{{- else }}
{{ $key }} = {{ $value }}
{{- end }}
{{- end }}
[continuous_queries]
{{- range $key, $value := index .Values.config.continuous_queries }}
{{- $tp := typeOf $value }}
{{- if eq $tp "string" }}
{{ $key }} = {{ $value | quote }}
{{- else }}
{{ $key }} = {{ $value }}
{{- end }}
{{- end }}
[logging]
{{- range $key, $value := index .Values.config.logging }}
{{- $tp := typeOf $value }}
{{- if eq $tp "string" }}
{{ $key }} = {{ $value | quote }}
{{- else }}
{{ $key }} = {{ $value }}
{{- end }}
{{- end }}
{{ if .Values.enterprise.enabled -}}
Expand Down

0 comments on commit c22d19f

Please sign in to comment.