You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/consul-dataplane/main.go
+56-4Lines changed: 56 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,16 @@ import (
12
12
)
13
13
14
14
var (
15
-
addressesstring
16
-
grpcPortint
15
+
addressesstring
16
+
grpcPortint
17
+
serverWatchDisabledbool
18
+
19
+
tlsDisabledbool
20
+
tlsCACertsPathstring
21
+
tlsServerNamestring
22
+
tlsCertFilestring
23
+
tlsKeyFilestring
24
+
tlsInsecureSkipVerifybool
17
25
18
26
logLevelstring
19
27
logJSONbool
@@ -24,7 +32,15 @@ var (
24
32
namespacestring
25
33
partitionstring
26
34
27
-
tokenstring
35
+
credentialTypestring
36
+
tokenstring
37
+
loginMethodstring
38
+
loginNamespacestring
39
+
loginPartitionstring
40
+
loginDatacenterstring
41
+
loginBearerstring
42
+
loginBearerPathstring
43
+
loginMetamap[string]string
28
44
29
45
useCentralTelemetryConfigbool
30
46
@@ -47,6 +63,8 @@ func init() {
47
63
48
64
flag.IntVar(&grpcPort, "grpc-port", 8502, "gRPC port on Consul servers.")
49
65
66
+
flag.BoolVar(&serverWatchDisabled, "server-watch-disabled", false, "Setting this prevents consul-dataplane from consuming the server update stream. This is useful for situations where Consul servers are behind a load balancer.")
67
+
50
68
flag.StringVar(&logLevel, "log-level", "info", "Log level of the messages to print. "+
51
69
"Available log levels are \"trace\", \"debug\", \"info\", \"warn\", and \"error\".")
52
70
@@ -58,7 +76,15 @@ func init() {
58
76
flag.StringVar(&namespace, "service-namespace", "", "The Consul Enterprise namespace in which the proxy service instance is registered.")
59
77
flag.StringVar(&partition, "service-partition", "", "The Consul Enterprise partition in which the proxy service instance is registered.")
60
78
79
+
flag.StringVar(&credentialType, "credential-type", "", "The type of credentials that will be used to authenticate with Consul servers (static or login).")
61
80
flag.StringVar(&token, "static-token", "", "The ACL token used to authenticate requests to Consul servers (when -login-method is set to static).")
81
+
flag.StringVar(&loginMethod, "login-method", "", "The auth method that will be used to log in.")
82
+
flag.StringVar(&loginNamespace, "login-namespace", "", "The Consul Enterprise namespace containing the auth method.")
83
+
flag.StringVar(&loginPartition, "login-partition", "", "The Consul Enterprise partition containing the auth method.")
84
+
flag.StringVar(&loginDatacenter, "login-datacenter", "", "The datacenter containing the auth method.")
85
+
flag.StringVar(&loginBearer, "login-bearer", "", "The bearer token that will be presented to the auth method.")
86
+
flag.StringVar(&loginBearerPath, "login-bearer-path", "", "The path to a file containing the bearer token that will be presented to the auth method.")
87
+
flag.Var((*FlagMapValue)(&loginMeta), "login-meta", "An arbitrary set of key/value pairs that will be attached to the ACL token (formatted as key=value, may be given multiple times).")
62
88
63
89
flag.BoolVar(&useCentralTelemetryConfig, "telemetry-use-central-config", true, "Controls whether the proxy will apply the central telemetry configuration.")
64
90
@@ -69,6 +95,13 @@ func init() {
69
95
70
96
flag.StringVar(&xdsBindAddr, "xds-bind-addr", "127.0.0.1", "The address on which the Envoy xDS server will be available.")
71
97
flag.IntVar(&xdsBindPort, "xds-bind-port", 0, "The port on which the Envoy xDS server will be available.")
98
+
99
+
flag.BoolVar(&tlsDisabled, "tls-disabled", false, "Communicate with Consul servers over a plaintext connection. Useful for testing, but not recommended for production.")
100
+
flag.StringVar(&tlsCACertsPath, "ca-certs", "", "The path to a file or directory containing CA certificates that will be used to verify the server's certificate.")
101
+
flag.StringVar(&tlsCertFile, "tls-cert", "", "The path to a client certificate file (only required if tls.grpc.verify_incoming is enabled on the server).")
102
+
flag.StringVar(&tlsKeyFile, "tls-key", "", "The path to a client private key file (only required if tls.grpc.verify_incoming is enabled on the server).")
103
+
flag.StringVar(&tlsServerName, "tls-server-name", "", "The hostname to expect in the server certificate's subject (required if -addresses isn't a DNS name).")
104
+
flag.BoolVar(&tlsInsecureSkipVerify, "tls-insecure-skip-verify", false, "Do not verify the server's certificate. Useful for testing, but not recommended for production.")
72
105
}
73
106
74
107
// validateFlags performs semantic validation of the flag values
0 commit comments