Skip to content

Commit d68a769

Browse files
authored
Merge pull request #5705 from lsst-sqre/tickets/DM-53377
[DM-53377] Workaround for the int to float64 Helm bug in the InlfuxDB Enterprise chart
2 parents c037464 + b93d4ca commit d68a769

File tree

4 files changed

+34
-57
lines changed

4 files changed

+34
-57
lines changed

applications/sasquatch/charts/influxdb-enterprise/templates/_helpers.tpl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,20 @@ Create the name of the service account
6161
{{ default "default" .Values.serviceAccount.name }}
6262
{{- end -}}
6363
{{- end -}}
64+
65+
{{/*
66+
Render config map, cast to int to fix Helm converting integers to float64
67+
*/}}
68+
{{- define "renderConfigMap" -}}
69+
{{- $map := . -}}
70+
{{- range $key, $value := $map }}
71+
{{- $tp := typeOf $value -}}
72+
{{- if eq $tp "string" }}
73+
{{ $key }} = {{ $value | quote }}
74+
{{- else if or (eq $tp "int") (eq $tp "float64") }}
75+
{{ $key }} = {{ int $value }}
76+
{{- else }}
77+
{{ $key }} = {{ $value }}
78+
{{- end }}
79+
{{- end }}
80+
{{- end -}}

applications/sasquatch/charts/influxdb-enterprise/templates/data-configmap.yaml

Lines changed: 7 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,7 @@ data:
1111
reporting-disabled = false
1212
1313
[http]
14-
{{- range $key, $value := index .Values.data.config.http }}
15-
{{- $tp := typeOf $value }}
16-
{{- if eq $tp "string" }}
17-
{{ $key }} = {{ $value | quote }}
18-
{{- else }}
19-
{{ $key }} = {{ $value }}
20-
{{- end }}
21-
{{- end }}
14+
{{- include "renderConfigMap" .Values.data.config.http }}
2215
2316
[enterprise]
2417
{{ if .Values.license.key }}
@@ -34,67 +27,24 @@ data:
3427
3528
[hinted-handoff]
3629
dir = "/var/lib/influxdb/hh"
37-
{{- range $key, $value := index .Values.data.config.hintedHandoff }}
38-
{{- $tp := typeOf $value }}
39-
{{- if eq $tp "string" }}
40-
{{ $key }} = {{ $value | quote }}
41-
{{- else }}
42-
{{ $key }} = {{ $value | int }}
43-
{{- end }}
44-
{{- end }}
30+
{{- include "renderConfigMap" .Values.data.config.hintedHandoff }}
4531
4632
[data]
4733
dir = "/var/lib/influxdb/data"
4834
wal-dir = "/var/lib/influxdb/wal"
49-
{{- range $key, $value := index .Values.data.config.data }}
50-
{{- $tp := typeOf $value }}
51-
{{- if eq $tp "string" }}
52-
{{ $key }} = {{ $value | quote }}
53-
{{- else }}
54-
{{ $key }} = {{ $value }}
55-
{{- end }}
56-
{{- end }}
35+
{{- include "renderConfigMap" .Values.data.config.data }}
5736
5837
[anti-entropy]
59-
{{- range $key, $value := index .Values.data.config.antiEntropy }}
60-
{{- $tp := typeOf $value }}
61-
{{- if eq $tp "string" }}
62-
{{ $key }} = {{ $value | quote }}
63-
{{- else }}
64-
{{ $key }} = {{ $value }}
65-
{{- end }}
66-
{{- end }}
38+
{{- include "renderConfigMap" .Values.data.config.antiEntropy }}
6739
6840
[cluster]
69-
{{- range $key, $value := index .Values.data.config.cluster }}
70-
{{- $tp := typeOf $value }}
71-
{{- if eq $tp "string" }}
72-
{{ $key }} = {{ $value | quote }}
73-
{{- else }}
74-
{{ $key }} = {{ $value }}
75-
{{- end }}
76-
{{- end }}
41+
{{- include "renderConfigMap" .Values.data.config.cluster }}
7742
7843
[continuous_queries]
79-
{{- range $key, $value := index .Values.data.config.continuousQueries }}
80-
{{- $tp := typeOf $value }}
81-
{{- if eq $tp "string" }}
82-
{{ $key }} = {{ $value | quote }}
83-
{{- else }}
84-
{{ $key }} = {{ $value }}
85-
{{- end }}
86-
{{- end }}
44+
{{- include "renderConfigMap" .Values.data.config.continuousQueries }}
8745
8846
[logging]
89-
{{- range $key, $value := index .Values.data.config.logging }}
90-
{{- $tp := typeOf $value }}
91-
{{- if eq $tp "string" }}
92-
{{ $key }} = {{ $value | quote }}
93-
{{- else }}
94-
{{ $key }} = {{ $value }}
95-
{{- end }}
96-
{{- end }}
97-
47+
{{- include "renderConfigMap" .Values.data.config.logging }}
9848
9949
entrypoint.pl: |+
10050
#!/usr/bin/env perl

applications/sasquatch/values-idfdev.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ influxdb-enterprise:
8181
config:
8282
antiEntropy:
8383
enabled: true
84+
cluster:
85+
max-concurrent-queries: 100
86+
query-timeout: "180s"
87+
log-queries-after: "10s"
88+
log-timedout-queries: true
89+
termination-query-log: true
90+
max-select-point: 50000000
91+
max-select-series: 200000
92+
max-select-buckets: 20000
8493
ingress:
8594
enabled: true
8695
hostname: data-dev.lsst.cloud

applications/sasquatch/values-usdfprod.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ influxdb-enterprise-active:
199199
log-queries-after: "10s"
200200
log-timedout-queries: true
201201
termination-query-log: true
202+
max-select-point: 50000000
202203
max-select-series: 200000
203204
max-select-buckets: 20000
204205
affinity:

0 commit comments

Comments
 (0)