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
+57-5Lines changed: 57 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,16 @@ import (
16
16
var (
17
17
printVersionbool
18
18
19
-
addressesstring
20
-
grpcPortint
19
+
addressesstring
20
+
grpcPortint
21
+
serverWatchDisabledbool
22
+
23
+
tlsDisabledbool
24
+
tlsCACertsPathstring
25
+
tlsServerNamestring
26
+
tlsCertFilestring
27
+
tlsKeyFilestring
28
+
tlsInsecureSkipVerifybool
21
29
22
30
logLevelstring
23
31
logJSONbool
@@ -28,7 +36,15 @@ var (
28
36
namespacestring
29
37
partitionstring
30
38
31
-
tokenstring
39
+
credentialTypestring
40
+
tokenstring
41
+
loginAuthMethodstring
42
+
loginNamespacestring
43
+
loginPartitionstring
44
+
loginDatacenterstring
45
+
loginBearerTokenstring
46
+
loginBearerTokenPathstring
47
+
loginMetamap[string]string
32
48
33
49
useCentralTelemetryConfigbool
34
50
@@ -54,6 +70,8 @@ func init() {
54
70
55
71
flag.IntVar(&grpcPort, "grpc-port", 8502, "gRPC port on Consul servers.")
56
72
73
+
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.")
74
+
57
75
flag.StringVar(&logLevel, "log-level", "info", "Log level of the messages to print. "+
58
76
"Available log levels are \"trace\", \"debug\", \"info\", \"warn\", and \"error\".")
59
77
@@ -65,7 +83,15 @@ func init() {
65
83
flag.StringVar(&namespace, "service-namespace", "", "The Consul Enterprise namespace in which the proxy service instance is registered.")
66
84
flag.StringVar(&partition, "service-partition", "", "The Consul Enterprise partition in which the proxy service instance is registered.")
67
85
68
-
flag.StringVar(&token, "static-token", "", "The ACL token used to authenticate requests to Consul servers (when -login-method is set to static).")
86
+
flag.StringVar(&credentialType, "credential-type", "", "The type of credentials that will be used to authenticate with Consul servers (static or login).")
87
+
flag.StringVar(&token, "static-token", "", "The ACL token used to authenticate requests to Consul servers (when -credential-type is set to static).")
88
+
flag.StringVar(&loginAuthMethod, "login-auth-method", "", "The auth method that will be used to log in.")
89
+
flag.StringVar(&loginNamespace, "login-namespace", "", "The Consul Enterprise namespace containing the auth method.")
90
+
flag.StringVar(&loginPartition, "login-partition", "", "The Consul Enterprise partition containing the auth method.")
91
+
flag.StringVar(&loginDatacenter, "login-datacenter", "", "The datacenter containing the auth method.")
92
+
flag.StringVar(&loginBearerToken, "login-bearer-token", "", "The bearer token that will be presented to the auth method.")
93
+
flag.StringVar(&loginBearerTokenPath, "login-bearer-token-path", "", "The path to a file containing the bearer token that will be presented to the auth method.")
94
+
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).")
69
95
70
96
flag.BoolVar(&useCentralTelemetryConfig, "telemetry-use-central-config", true, "Controls whether the proxy will apply the central telemetry configuration.")
71
97
@@ -77,6 +103,13 @@ func init() {
77
103
78
104
flag.StringVar(&xdsBindAddr, "xds-bind-addr", "127.0.0.1", "The address on which the Envoy xDS server will be available.")
79
105
flag.IntVar(&xdsBindPort, "xds-bind-port", 0, "The port on which the Envoy xDS server will be available.")
106
+
107
+
flag.BoolVar(&tlsDisabled, "tls-disabled", false, "Communicate with Consul servers over a plaintext connection. Useful for testing, but not recommended for production.")
108
+
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.")
109
+
flag.StringVar(&tlsCertFile, "tls-cert", "", "The path to a client certificate file (only required if tls.grpc.verify_incoming is enabled on the server).")
110
+
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).")
111
+
flag.StringVar(&tlsServerName, "tls-server-name", "", "The hostname to expect in the server certificate's subject (required if -addresses isn't a DNS name).")
112
+
flag.BoolVar(&tlsInsecureSkipVerify, "tls-insecure-skip-verify", false, "Do not verify the server's certificate. Useful for testing, but not recommended for production.")
80
113
}
81
114
82
115
// validateFlags performs semantic validation of the flag values
0 commit comments