blob: c8e289afa8e3a393fcb57a1761003c1a4eb65a1d [file] [log] [blame]
Chandru22ebf742021-06-02 17:16:37 +05301apiVersion: v1
2kind: ConfigMap
3metadata:
Chandrasekaran Ramachandranb515b962021-06-11 16:07:09 +05304 name: {{ include "common.fullname.influxdb" . }}
Chandru22ebf742021-06-02 17:16:37 +05305 labels:
Chandrasekaran Ramachandranb515b962021-06-11 16:07:09 +05306 {{- include "common.influxdb.labels" . | nindent 4 }}
Chandru22ebf742021-06-02 17:16:37 +05307data:
8 influxdb.conf: |+
9 reporting-disabled = {{ .Values.config.reporting_disabled | default false }}
Chandrasekaran Ramachandranb515b962021-06-11 16:07:09 +053010 bind-address = ":{{ include "common.serviceport.influxdb.rpc.bind_address" . | default 8088 }}"
Chandru22ebf742021-06-02 17:16:37 +053011
12 [meta]
13 dir = "/var/lib/influxdb/meta"
14 {{- range $key, $value := index .Values.config.meta }}
15 {{- $tp := typeOf $value }}
16 {{- if eq $tp "string" }}
17 {{ $key }} = {{ $value | quote }}
18 {{- else }}
19 {{ $key }} = {{ $value }}
20 {{- end }}
21 {{- end }}
22
23 {{- if .Values.enterprise.enabled }}
24 internal-shared-secret = "{{ sha256sum .Values.enterprise.meta.seed }}"
25 meta-auth-enabled = {{ .Values.config.meta.authEnabled }}
26 {{- end }}
27
28 [data]
29 dir = "/var/lib/influxdb/data"
30 wal-dir = "/var/lib/influxdb/wal"
31 {{- range $key, $value := index .Values.config.data }}
32 {{- $tp := typeOf $value }}
33 {{- if eq $tp "string" }}
34 {{ $key }} = {{ $value | quote }}
35 {{- else }}
36 {{ $key }} = {{ $value }}
37 {{- end }}
38 {{- end }}
39
40 [coordinator]
41 {{- range $key, $value := index .Values.config.coordinator }}
42 {{- $tp := typeOf $value }}
43 {{- if eq $tp "string" }}
44 {{ $key }} = {{ $value | quote }}
45 {{- else }}
46 {{ $key }} = {{ $value }}
47 {{- end }}
48 {{- end }}
49
50 [retention]
51 {{- range $key, $value := index .Values.config.retention }}
52 {{- $tp := typeOf $value }}
53 {{- if eq $tp "string" }}
54 {{ $key }} = {{ $value | quote }}
55 {{- else }}
56 {{ $key }} = {{ $value }}
57 {{- end }}
58 {{- end }}
59
60 [shard-precreation]
61 {{- range $key, $value := index .Values.config.shard_precreation }}
62 {{- $tp := typeOf $value }}
63 {{- if eq $tp "string" }}
64 {{ $key }} = {{ $value | quote }}
65 {{- else }}
66 {{ $key }} = {{ $value }}
67 {{- end }}
68 {{- end }}
69
70 [monitor]
71 {{- range $key, $value := index .Values.config.monitor }}
72 {{- $tp := typeOf $value }}
73 {{- if eq $tp "string" }}
74 {{ $key }} = {{ $value | quote }}
75 {{- else }}
76 {{ $key }} = {{ $value }}
77 {{- end }}
78 {{- end }}
79
80 [subscriber]
81 {{- range $key, $value := index .Values.config.subscriber }}
82 {{- $tp := typeOf $value }}
83 {{- if eq $tp "string" }}
84 {{ $key }} = {{ $value | quote }}
85 {{- else }}
86 {{ $key }} = {{ $value }}
87 {{- end }}
88 {{- end }}
89
90 [http]
91 {{- range $key, $value := index .Values.config.http }}
92 {{- $tp := typeOf $value }}
93 {{- if eq $tp "string" }}
94 {{ $key }} = {{ $value | quote }}
95 {{- else }}
96 {{ $key }} = {{ $value }}
97 {{- end }}
98 {{- end }}
99
100 # TODO: allow multiple graphite listeners
101
102 [[graphite]]
103 {{- range $key, $value := index .Values.config.graphite }}
104 {{- if ne $key "templates"}}
105 {{- $tp := typeOf $value }}
106 {{- if eq $tp "string" }}
107 {{ $key }} = {{ $value | quote }}
108 {{- else }}
109 {{ $key }} = {{ $value }}
110 {{- end }}
111 {{- end }}
112 {{- end }}
113 {{- if .Values.config.graphite.templates }}
114 templates = [
115 {{- range .Values.config.graphite.templates }}
116 {{ quote . }},
117 {{- end }}
118 ]
119 {{- end }}
120
121 # TODO: allow multiple collectd listeners with templates
122
123 [[collectd]]
124 {{- range $key, $value := index .Values.config.collectd }}
125 {{- $tp := typeOf $value }}
126 {{- if eq $tp "string" }}
127 {{ $key }} = {{ $value | quote }}
128 {{- else }}
129 {{ $key }} = {{ $value }}
130 {{- end }}
131 {{- end }}
132
133 # TODO: allow multiple opentsdb listeners with templates
134
135 [[opentsdb]]
136 {{- range $key, $value := index .Values.config.opentsdb }}
137 {{- $tp := typeOf $value }}
138 {{- if eq $tp "string" }}
139 {{ $key }} = {{ $value | quote }}
140 {{- else }}
141 {{ $key }} = {{ $value }}
142 {{- end }}
143 {{- end }}
144
145 # TODO: allow multiple udp listeners with templates
146
147 [[udp]]
148 {{- range $key, $value := index .Values.config.udp }}
149 {{- $tp := typeOf $value }}
150 {{- if eq $tp "string" }}
151 {{ $key }} = {{ $value | quote }}
152 {{- else }}
153 {{ $key }} = {{ $value }}
154 {{- end }}
155 {{- end }}
156
157 [continuous_queries]
158 {{- range $key, $value := index .Values.config.continuous_queries }}
159 {{- $tp := typeOf $value }}
160 {{- if eq $tp "string" }}
161 {{ $key }} = {{ $value | quote }}
162 {{- else }}
163 {{ $key }} = {{ $value }}
164 {{- end }}
165 {{- end }}
166
167 [logging]
168 {{- range $key, $value := index .Values.config.logging }}
169 {{- $tp := typeOf $value }}
170 {{- if eq $tp "string" }}
171 {{ $key }} = {{ $value | quote }}
172 {{- else }}
173 {{ $key }} = {{ $value }}
174 {{- end }}
175 {{- end }}
176
177 {{ if .Values.enterprise.enabled -}}
178 [enterprise]
179 license-key = {{ .Values.enterprise.licensekey | quote }}
180
181 [hinted-handoff]
182 enabled = true
183 dir = "/var/lib/influxdb/hh"
184 {{- end }}