Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
influxdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
influxdb
Commits
56902b89
Unverified
Commit
56902b89
authored
Jan 27, 2022
by
alespour
Committed by
GitHub
Jan 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix rendering of nested tables list (#413)
parent
1d311adb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletion
+37
-1
Chart.yaml
charts/telegraf/Chart.yaml
+1
-1
inputs-nested-tables-list-values.yaml
charts/telegraf/ci/inputs-nested-tables-list-values.yaml
+18
-0
_helpers.tpl
charts/telegraf/templates/_helpers.tpl
+18
-0
No files found.
charts/telegraf/Chart.yaml
View file @
56902b89
apiVersion
:
v2
name
:
telegraf
version
:
1.8.1
2
version
:
1.8.1
3
appVersion
:
1.21.2
deprecated
:
false
description
:
Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.
...
...
charts/telegraf/ci/inputs-nested-tables-list-values.yaml
0 → 100644
View file @
56902b89
config
:
inputs
:
-
statsd
:
service_address
:
"
:8125"
percentiles
:
-
50
-
95
-
99
metric_separator
:
"
_"
allowed_pending_messages
:
10000
percentile_limit
:
1000
-
postgresql_extensible
:
address
:
"
host=localhost
user=postgres
sslmode=disable"
query
:
-
sqlquery
:
"
SELECT
count(*)
as
total_user_count
FROM
users"
version
:
801
-
sqlquery
:
"
SELECT
count(*)
as
total_post_count
FROM
posts"
version
:
801
charts/telegraf/templates/_helpers.tpl
View file @
56902b89
...
...
@@ -201,6 +201,23 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{ $key }} = {{ $value }}
{{- end }}
{{- if eq $tp "[]interface {}" }}
{{- if eq (index $value 0 | typeOf) "map[string]interface {}" -}}
{{- range $b, $val := $value }}
[[inputs.{{- $input }}.{{- $key }}]]
{{- range $k, $v := $val }}
{{- $tps := typeOf $v }}
{{- if eq $tps "string" }}
{{ $k }} = {{ $v | quote }}
{{- end }}
{{- if eq $tps "float64" }}
{{ $k }} = {{ $v | int64 }}
{{- end }}
{{- if eq $tps "bool" }}
{{ $k }} = {{ $v }}
{{- end }}
{{- end }}
{{- end }}
{{- else }}
{{ $key }} = [
{{- $numOut := len $value }}
{{- $numOut := sub $numOut 1 }}
...
...
@@ -227,6 +244,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{- end }}
]
{{- end }}
{{- end }}
{{- end }}
{{- range $key, $value := $config -}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment