Skip to content

Commit

Permalink
Add env var support for all the TLS flags.
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Young <ynick@vmware.com>
  • Loading branch information
Nick Young committed Jun 28, 2019
1 parent d6640b6 commit 1eea494
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/contour/contour.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ func main() {
bootstrap.Flag("admin-port", "Envoy admin interface port").IntVar(&config.AdminPort)
bootstrap.Flag("xds-address", "xDS gRPC API address").StringVar(&config.XDSAddress)
bootstrap.Flag("xds-port", "xDS gRPC API port").IntVar(&config.XDSGRPCPort)
bootstrap.Flag("envoy-cafile", "gRPC CA Filename for Envoy to load").StringVar(&config.GrpcCABundle)
bootstrap.Flag("envoy-cert-file", "gRPC Client cert filename for Envoy to load").StringVar(&config.GrpcClientCert)
bootstrap.Flag("envoy-key-file", "gRPC Client key filename for Envoy to load").StringVar(&config.GrpcClientKey)
bootstrap.Flag("envoy-cafile", "gRPC CA Filename for Envoy to load").Envar("ENVOY_CAFILE").StringVar(&config.GrpcCABundle)
bootstrap.Flag("envoy-cert-file", "gRPC Client cert filename for Envoy to load").Envar("ENVOY_CERT_FILE").StringVar(&config.GrpcClientCert)
bootstrap.Flag("envoy-key-file", "gRPC Client key filename for Envoy to load").Envar("ENVOY_KEY_FILE").StringVar(&config.GrpcClientKey)

// Get the running namespace passed via ENV var from the Kubernetes Downward API
config.Namespace = getEnv("CONTOUR_NAMESPACE", "heptio-contour")
Expand Down Expand Up @@ -97,9 +97,9 @@ func main() {
xdsPort := serve.Flag("xds-port", "xDS gRPC API port").Default("8001").Int()
statsAddress := serve.Flag("stats-address", "Envoy /stats interface address").Default("0.0.0.0").String()
statsPort := serve.Flag("stats-port", "Envoy /stats interface port").Default("8002").Int()
caFile := serve.Flag("contour-cafile", "CA bundle file name for serving gRPC with TLS").String()
contourCert := serve.Flag("contour-cert-file", "Contour certificate file name for serving gRPC over TLS").String()
contourKey := serve.Flag("contour-key-file", "Contour key file name for serving gRPC over TLS").String()
caFile := serve.Flag("contour-cafile", "CA bundle file name for serving gRPC with TLS").Envar("CONTOUR_CAFILE").String()
contourCert := serve.Flag("contour-cert-file", "Contour certificate file name for serving gRPC over TLS").Envar("CONTOUR_CERT_FILE").String()
contourKey := serve.Flag("contour-key-file", "Contour key file name for serving gRPC over TLS").Envar("CONTOUR_KEY_FILE").String()

ch := contour.CacheHandler{
FieldLogger: log.WithField("context", "CacheHandler"),
Expand Down

0 comments on commit 1eea494

Please sign in to comment.