File tree Expand file tree Collapse file tree
grafana/10/chart/grafana/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,3 +52,4 @@ Chart.lock
5252* .fix
5353addons /grafana /10 /dashborad /
5454addons /prometheus /prom-value.yaml
55+ toCopy /
Original file line number Diff line number Diff line change @@ -60,3 +60,22 @@ Return the Fluentbit Reloader image name
6060{{- include " fluentbit.image" . -}}
6161{{- end -}}
6262{{- end -}}
63+
64+ {{/*
65+ Return the Fluentbit input path
66+ */ }}
67+ {{- define " input.paths" -}}
68+ {{- $namespace := .Release.Namespace -}}
69+ {{- $wildcards := .Values.daemonset.config.podWildcards -}}
70+ {{- $pathTemplate := " /var/log/containers/%s _%s _*.log" -}}
71+
72+ {{/* */ }}
73+ {{- $paths := list -}}
74+ {{- range $wildcard := $wildcards -}}
75+ {{- $path := printf $pathTemplate $wildcard $namespace -}}
76+ {{- $paths = append $paths $path -}}
77+ {{- end -}}
78+ {{- join " ," $paths -}}
79+ {{- end -}}
80+
81+
Original file line number Diff line number Diff line change @@ -164,8 +164,9 @@ daemonset:
164164 type : OnDelete
165165 flush : 1
166166 # # https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/configuration-file
167- config :
168-
167+ config :
168+ podWildcards :
169+ - " *"
169170 service : |
170171 [SERVICE]
171172 Flush {{ .Values.daemonset.flush }}
@@ -181,7 +182,7 @@ daemonset:
181182 inputs : |
182183 [INPUT]
183184 Name tail
184- Path /var/log/containers/*_ {{ .Release.Namespace }}_*.log
185+ Path {{ include "input.paths" . }}
185186 DB /data/containers.pos.db
186187 DB.locking true
187188 Offset_Key offset
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ allow_parameters:
1818- name : " daemonset.extraEnvVars"
1919 required : false
2020 description : " extra environment variables to add to fluentbit"
21+ - name : " daemonset.config.podWildcards"
22+ equired : false
23+ description : " fluentbit inout paths pod wildcards"
2124- name : " daemonset.config.outputs"
2225 required : true
2326 description : " destinations for your data: databases, cloud services and more"
Original file line number Diff line number Diff line change 3232 GF_PATHS_CONFIG : " /opt/drycc/grafana/conf/grafana.ini"
3333 GF_PATHS_DATA : " /opt/drycc/grafana/data"
3434 GF_PATHS_LOGS : " /opt/drycc/grafana/logs"
35+
You can’t perform that action at this time.
0 commit comments