Skip to content

Commit beeff4d

Browse files
author
Chris Chapman
committed
Initial commit for adding support for -- envoy flags
1 parent 1dc4bee commit beeff4d

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

cmd/consul-dataplane/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ func main() {
8686

8787
validateFlags()
8888

89+
extraEnvoyArgs := flag.Args()
90+
8991
consuldpCfg := &consuldp.Config{
9092
Consul: &consuldp.ConsulConfig{
9193
Addresses: addresses,
@@ -116,6 +118,7 @@ func main() {
116118
AdminBindPort: adminBindPort,
117119
ReadyBindAddress: readyBindAddr,
118120
ReadyBindPort: readyBindPort,
121+
ExtraArgs: extraEnvoyArgs,
119122
},
120123
XDSServer: &consuldp.XDSServer{
121124
BindAddress: xdsBindAddr,

pkg/consuldp/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ type EnvoyConfig struct {
7474
ReadyBindAddress string
7575
// ReadyBindPort is the port on which the Envoy readiness probe will be available.
7676
ReadyBindPort int
77+
// ExtraArgs are the extra arguments passed to envoy at startup of the proxy
78+
ExtraArgs []string
7779
}
7880

7981
// XDSServer contains the configuration of the xDS server.

pkg/consuldp/consul_dataplane.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ func (cdp *ConsulDataplane) Run(ctx context.Context) error {
181181
Logger: cdp.logger,
182182
LogJSON: cdp.cfg.Logging.LogJSON,
183183
BootstrapConfig: cfg,
184+
ExtraArgs: cdp.cfg.Envoy.ExtraArgs,
184185
})
185186
if err != nil {
186187
cdp.logger.Error("failed to create new proxy", "error", err)

0 commit comments

Comments
 (0)