Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jobs/loggr-forwarder-agent-windows/monit
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"executable" => "/var/vcap/packages/forwarder-agent-windows/forwarder-agent.exe",
"args" => [],
"env" => {
"AGENT_HOST" => "#{p("host")}",
"AGENT_PORT" => "#{p("port")}",
"AGENT_CA_FILE_PATH" => "#{certs_dir}/loggregator_ca.crt",
"AGENT_CERT_FILE_PATH" => "#{certs_dir}/forwarder.crt",
Expand Down
3 changes: 3 additions & 0 deletions jobs/loggr-forwarder-agent-windows/spec
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ packages:
- forwarder-agent-windows

properties:
host:
description: "Host the agent is serving gRPC via mTLS"
default: "127.0.0.1"
port:
description: "Port the agent is serving gRPC via mTLS"
default: 3458
Expand Down
3 changes: 3 additions & 0 deletions jobs/loggr-forwarder-agent/spec
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ packages:
- forwarder-agent

properties:
host:
description: "Host the agent is serving gRPC via mTLS"
default: "127.0.0.1"
port:
description: "Port the agent is serving gRPC via mTLS"
default: 3458
Expand Down
1 change: 1 addition & 0 deletions jobs/loggr-forwarder-agent/templates/bpm.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
],
},
"env" => {
"AGENT_HOST" => "#{p("host")}",
"AGENT_PORT" => "#{p("port")}",
"AGENT_CA_FILE_PATH" => "#{certs_dir}/loggregator_ca.crt",
"AGENT_CERT_FILE_PATH" => "#{certs_dir}/forwarder.crt",
Expand Down
2 changes: 2 additions & 0 deletions src/cmd/forwarder-agent/app/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
// GRPC stores the configuration for the router as a server using a PORT
// with mTLS certs and as a client.
type GRPC struct {
Host string `env:"AGENT_HOST, report"`
Port uint16 `env:"AGENT_PORT, report"`
CAFile string `env:"AGENT_CA_FILE_PATH, required, report"`
CertFile string `env:"AGENT_CERT_FILE_PATH, required, report"`
Expand Down Expand Up @@ -40,6 +41,7 @@ type Config struct {
func LoadConfig() Config {
cfg := Config{
GRPC: GRPC{
Host: "127.0.0.1",
Port: 3458,
},
}
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/forwarder-agent/app/forwarder_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (s *ForwarderAgent) Run() {
rx := v2.NewReceiver(diode, im, omm)

s.v2srv = v2.NewServer(
fmt.Sprintf("127.0.0.1:%d", s.grpc.Port),
fmt.Sprintf("%s:%d", s.grpc.Host, s.grpc.Port),
rx,
grpc.Creds(serverCreds),
grpc.MaxRecvMsgSize(10*1024*1024),
Expand Down
Loading