Skip to content

Commit 79aadfe

Browse files
set /insert/internal as the default path only if no custom URL path is provided by the user (#2637)
1 parent abb43eb commit 79aadfe

File tree

8 files changed

+13
-7
lines changed

8 files changed

+13
-7
lines changed

charts/victoria-logs-agent/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Next release
22

3-
- TODO
3+
- allow overriding the default `remoteWrite.url` path by specifying a non-empty value other than `/` for the `remoteWrite.url` field
44

55
## 0.0.1
66

charts/victoria-logs-agent/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ type: application
33
appVersion: v1.43.0
44
name: victoria-logs-agent
55
description: VictoriaLogs Agent - accepts logs from various protocols and replicates them across multiple VictoriaLogs instances.
6-
version: 0.0.1
6+
version: 0.0.2
77
sources:
88
- https://github.com/VictoriaMetrics/helm-charts
99
icon: https://avatars.githubusercontent.com/u/43720803?s=200&v=4

charts/victoria-logs-agent/templates/_helpers.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
{{- end }}
2727
{{- $value := $rwValue }}
2828
{{- if eq $rwKey "url" }}
29-
{{- $value = printf "%s/insert/native" (trimSuffix "/" $rwValue) }}
29+
{{- $url := urlParse $rwValue }}
30+
{{- $_ = set $url "path" (ternary "/insert/native" $url.path (empty (trimPrefix "/" $url.path))) }}
31+
{{- $value = urlJoin $url }}
3032
{{- else if eq $rwKey "headers" }}
3133
{{- $headers := list }}
3234
{{- range $hk, $hv := $rwValue }}

charts/victoria-logs-agent/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
maxDiskUsagePerURL: 1GiB
99

1010
# -- List of log destinations. Logs will be replicated to all listed destinations.
11+
#
12+
# If the url path is not specified, the logs will be sent to the /insert/native endpoint.
1113
remoteWrite: []
1214
# - url: http://victoria-logs:9428
1315

charts/victoria-logs-collector/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Next release
22

3-
- TODO
3+
- allow overriding the default `remoteWrite.url` path by specifying a non-empty value other than `/` for the `remoteWrite.url` field
44

55
## 0.2.2
66

charts/victoria-logs-collector/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
type: application
33
name: victoria-logs-collector
44
description: VictoriaLogs Collector - collects logs from Kubernetes containers and stores them to VictoriaLogs
5-
version: 0.2.2
5+
version: 0.2.3
66
appVersion: v1.43.0
77
sources:
88
- https://github.com/VictoriaMetrics/helm-charts

charts/victoria-logs-collector/templates/_helpers.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@
118118
{{- end }}
119119
{{- $value := $rwValue }}
120120
{{- if eq $rwKey "url" }}
121-
{{- $value = printf "%s/insert/native" (trimSuffix "/" $rwValue) }}
121+
{{- $url := urlParse $rwValue }}
122+
{{- $_ = set $url "path" (ternary "/insert/native" $url.path (empty (trimPrefix "/" $url.path))) }}
123+
{{- $value = urlJoin $url }}
122124
{{- else if eq $rwKey "headers" }}
123125
{{- $headers := list }}
124126
{{- range $hk, $hv := $rwValue }}

charts/victoria-logs-collector/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ image:
1818

1919
# -- List of log destinations. Logs will be replicated to all listed destinations.
2020
#
21-
# If using a proxy (e.g., vmauth, nginx) in front of VictoriaLogs, make sure /insert/jsonline and /insert/native endpoints are properly routed.
21+
# If the url path is not specified, the logs will be sent to the /insert/native endpoint.
2222
remoteWrite: []
2323
# - url: http://victoria-logs:9428
2424

0 commit comments

Comments
 (0)