Skip to content

Commit

Permalink
cleaner proxy url injection into userdata
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelEischer committed Oct 30, 2024
1 parent 4980cdf commit 5d32e84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/helper/loadbalancermachine.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ func generatePromtailConfig(

proxy := ""
if logForward.ProxyURL != "" {
proxy = "\n proxy_url: '" + logForward.ProxyURL + "'"
proxy = " proxy_url: '" + logForward.ProxyURL + "'"
}

return `server:
Expand All @@ -499,7 +499,8 @@ positions:
filename: /tmp/positions.yaml
clients:
- url: '` + logForward.LokiURL + "'" + proxy + `
- url: '` + logForward.LokiURL + `'
` + proxy + `
scrape_configs:
- job_name: messages
Expand Down
1 change: 1 addition & 0 deletions internal/helper/loadbalancermachine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ positions:
clients:
- url: 'localhost'
scrape_configs:
- job_name: messages
static_configs:
Expand Down

0 comments on commit 5d32e84

Please sign in to comment.