blob: 3224dff249e15b10507973178840fd7ef557d857 [file] [log] [blame]
Pavel Cizinsky8835dfa2016-08-10 15:09:25 +02001{%- from "etcd/map.jinja" import server with context %}
2## etcd(1) daemon options
3## See "/usr/share/doc/etcd/Documentation/configuration.md.gz".
4
marcoc4c0a9a2016-09-22 18:47:12 +02005{%- if server.proxy is defined %}
Pavel Cizinsky8835dfa2016-08-10 15:09:25 +02006
7### Proxy Flags
8
9##### -proxy
10## Proxy mode setting ("off", "readonly" or "on").
11## default: "off"
12ETCD_PROXY="on"
13
14ETCD_INITIAL_CLUSTER="{% for member in server.members %}{{ member.name }}={%- if server.bind.host == '127.0.0.1' %}http://127.0.0.1:2380{% else %}http://{{ member.host }}:2380{% if not loop.last %},{% endif %}{% endif %}{% endfor %}"
15
16##### -proxy-failure-wait
17## Time (in milliseconds) an endpoint will be held in a failed state before being
18## reconsidered for proxied requests.
19## default: 5000
20# ETCD_PROXY_FAILURE_WAIT="5000"
21
22##### -proxy-refresh-interval
23## Time (in milliseconds) of the endpoints refresh interval.
24## default: 30000
25# ETCD_PROXY_REFRESH_INTERVAL="30000"
26
27##### -proxy-dial-timeout
28## Time (in milliseconds) for a dial to timeout or 0 to disable the timeout
29## default: 1000
30# ETCD_PROXY_DIAL_TIMEOUT="1000"
31
32##### -proxy-write-timeout
33## Time (in milliseconds) for a write to timeout or 0 to disable the timeout.
34## default: 5000
35# ETCD_PROXY_WRITE_TIMEOUT="5000"
36
37##### -proxy-read-timeout
38## Time (in milliseconds) for a read to timeout or 0 to disable the timeout.
39## Don't change this value if you use watches because they are using long polling requests.
40## default: 0
41# ETCD_PROXY_READ_TIMEOUT="0"
42
43
44{%- else %}
45### Member Flags
46
47##### -name
48## Human-readable name for this member.
49## default: host name returned by `hostname`.
50## This value is referenced as this node's own entries listed in the `-initial-cluster`
51## flag (Ex: `default=http://localhost:2380` or `default=http://localhost:2380,default=http://localhost:7001`).
52## This needs to match the key used in the flag if you're using [static boostrapping](clustering.md#static).
53# ETCD_NAME="hostname"
54ETCD_NAME="{{ pillar.linux.system.name }}"
55
56##### -data-dir
57## Path to the data directory.
58# ETCD_DATA_DIR="/var/lib/etcd/default"
59ETCD_DATA_DIR="/var/lib/etcd/default"
60
61##### -wal-dir
62## Path to the dedicated wal directory. If this flag is set, etcd will write the
63## WAL files to the walDir rather than the dataDir. This allows a dedicated disk
64## to be used, and helps avoid io competition between logging and other IO operations.
65## default: ""
66# ETCD_WAL_DIR
67
68##### -snapshot-count
69## Number of committed transactions to trigger a snapshot to disk.
70## default: "10000"
71# ETCD_SNAPSHOT_COUNT="10000"
72
73##### -heartbeat-interval
74## Time (in milliseconds) of a heartbeat interval.
75## default: "100"
76# ETCD_HEARTBEAT_INTERVAL="100"
77
78##### -election-timeout
79## Time (in milliseconds) for an election to timeout.
80## See /usr/share/doc/etcd/Documentation/tuning.md
81## default: "1000"
82# ETCD_ELECTION_TIMEOUT="1000"
83
84##### -listen-peer-urls
85## List of URLs to listen on for peer traffic. This flag tells the etcd to accept
86## incoming requests from its peers on the specified scheme://IP:port combinations.
87## Scheme can be either http or https. If 0.0.0.0 is specified as the IP, etcd
88## listens to the given port on all interfaces. If an IP address is given as
89## well as a port, etcd will listen on the given port and interface.
90## Multiple URLs may be used to specify a number of addresses and ports to listen on.
91## The etcd will respond to requests from any of the listed addresses and ports.
92## example: "http://10.0.0.1:2380"
93## invalid example: "http://example.com:2380" (domain name is invalid for binding)
94## default: "http://localhost:2380,http://localhost:7001"
95# ETCD_LISTEN_PEER_URLS="http://localhost:2380,http://localhost:7001"
marcoc4c0a9a2016-09-22 18:47:12 +020096ETCD_LISTEN_PEER_URLS="http://{{ server.bind.host }}:2380"
Pavel Cizinsky8835dfa2016-08-10 15:09:25 +020097
98##### -listen-client-urls
99## List of URLs to listen on for client traffic. This flag tells the etcd to accept
100## incoming requests from the clients on the specified scheme://IP:port combinations.
101## Scheme can be either http or https. If 0.0.0.0 is specified as the IP, etcd
102## listens to the given port on all interfaces. If an IP address is given as
103## well as a port, etcd will listen on the given port and interface.
104## Multiple URLs may be used to specify a number of addresses and ports to listen on.
105## The etcd will respond to requests from any of the listed addresses and ports.
106## (ADVERTISE_CLIENT_URLS is required when LISTEN_CLIENT_URLS is set explicitly).
107## example: "http://10.0.0.1:2379"
108## invalid example: "http://example.com:2379" (domain name is invalid for binding)
109## default: "http://localhost:2379,http://localhost:4001"
110# ETCD_LISTEN_CLIENT_URLS="http://localhost:2379,http://localhost:4001"
111ETCD_LISTEN_CLIENT_URLS="{%- if server.bind.host != '127.0.0.1' %}http://{{ server.bind.host }}:4001,{% endif %}http://127.0.0.1:4001"
112##### -max-snapshots
113## Maximum number of snapshot files to retain (0 is unlimited)
114## default: 5
115# ETCD_MAX_SNAPSHOTS="5"
116
117##### -max-wals
118## Maximum number of wal files to retain (0 is unlimited)
119## default: 5
120# ETCD_MAX_WALS="5"
121
122##### -cors
123## Comma-separated whitelist of origins for CORS (cross-origin resource sharing).
124## default: none
125# ETCD_CORS
126
127### Clustering Flags
128## For an explanation of the various ways to do cluster setup, see:
129## /usr/share/doc/etcd/Documentation/clustering.md.gz
130##
131## The command line parameters starting with -initial-cluster will be
132## ignored on subsequent runs of etcd as they are used only during initial
133## bootstrap process.
134
135##### -initial-advertise-peer-urls
136## List of this member's peer URLs to advertise to the rest of the cluster.
137## These addresses are used for communicating etcd data around the cluster.
138## At least one must be routable to all cluster members.
139## These URLs can contain domain names.
140## example: "http://example.com:2380, http://10.0.0.1:2380"
141## default: "http://localhost:2380,http://localhost:7001"
142# ETCD_INITIAL_ADVERTISE_PEER_URLS="http://localhost:2380,http://localhost:7001"
143ETCD_INITIAL_ADVERTISE_PEER_URLS="http://{{ server.bind.host }}:2380"
144
145##### -initial-cluster
146## initial cluster configuration for bootstrapping.
147## The key is the value of the `-name` flag for each node provided.
148## The default uses `default` for the key because this is the default for the `-name` flag.
149## default: "default=http://localhost:2380,default=http://localhost:7001"
150# ETCD_INITIAL_CLUSTER="default=http://localhost:2380,default=http://localhost:7001"
151ETCD_INITIAL_CLUSTER="{% for member in server.members %}{{ member.name }}={%- if server.bind.host == '127.0.0.1' %}http://127.0.0.1:2380{% else %}http://{{ member.host }}:2380{% if not loop.last %},{% endif %}{% endif %}{% endfor %}"
152##### -initial-cluster-state
153## Initial cluster state ("new" or "existing"). Set to `new` for all members
154## present during initial static or DNS bootstrapping. If this option is set to
155## `existing`, etcd will attempt to join the existing cluster. If the wrong
156## value is set, etcd will attempt to start but fail safely.
157## default: "new"
158# ETCD_INITIAL_CLUSTER_STATE="existing"
159ETCD_INITIAL_CLUSTER_STATE="new"
160
161##### -initial-cluster-token
162## Initial cluster token for the etcd cluster during bootstrap.
163## If you are spinning up multiple clusters (or creating and destroying a
164## single cluster) with same configuration for testing purpose, it is highly
165## recommended that you specify a unique initial-cluster-token for the
166## different clusters.
167## default: "etcd-cluster"
168# ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster"
169ETCD_INITIAL_CLUSTER_TOKEN="{{ server.token }}"
170
171##### -advertise-client-urls
172## List of this member's client URLs to advertise to the rest of the cluster.
173## These URLs can contain domain names.
174## example: "http://example.com:2379, http://10.0.0.1:2379"
175## Be careful if you are advertising URLs such as http://localhost:2379 from a
176## cluster member and are using the proxy feature of etcd. This will cause loops,
177## because the proxy will be forwarding requests to itself until its resources
178## (memory, file descriptors) are eventually depleted.
179## default: "http://localhost:2379,http://localhost:4001"
180# ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379,http://localhost:4001"
181ETCD_ADVERTISE_CLIENT_URLS="http://{{ server.bind.host }}:4001"
182
183##### -discovery
184## Discovery URL used to bootstrap the cluster.
185## default: none
186# ETCD_DISCOVERY
187
188##### -discovery-srv
189## DNS srv domain used to bootstrap the cluster.
190## default: none
191# ETCD_DISCOVERY_SRV
192
193##### -discovery-fallback
194## Expected behavior ("exit" or "proxy") when discovery services fails.
195## default: "proxy"
196# ETCD_DISCOVERY_FALLBACK="proxy"
197
198##### -discovery-proxy
199## HTTP proxy to use for traffic to discovery service.
200## default: none
201# ETCD_DISCOVERY_PROXY
202
203### Security Flags
204
205##### -ca-file [DEPRECATED]
206## Path to the client server TLS CA file.
207## default: none
208# ETCD_CA_FILE=""
209
210##### -cert-file
211## Path to the client server TLS cert file.
212## default: none
213# ETCD_CERT_FILE=""
214
215##### -key-file
216## Path to the client server TLS key file.
217## default: none
218# ETCD_KEY_FILE=""
219
220##### -client-cert-auth
221## Enable client cert authentication.
222## default: false
223# ETCD_CLIENT_CERT_AUTH
224
225##### -trusted-ca-file
226## Path to the client server TLS trusted CA key file.
227## default: none
228# ETCD_TRUSTED_CA_FILE
229
230##### -peer-ca-file [DEPRECATED]
231## Path to the peer server TLS CA file. `-peer-ca-file ca.crt` could be replaced
232## by `-peer-trusted-ca-file ca.crt -peer-client-cert-auth` and etcd will perform the same.
233## default: none
234# ETCD_PEER_CA_FILE
235
236##### -peer-cert-file
237## Path to the peer server TLS cert file.
238## default: none
239# ETCD_PEER_CERT_FILE
240
241##### -peer-key-file
242## Path to the peer server TLS key file.
243## default: none
244# ETCD_PEER_KEY_FILE
245
246##### -peer-client-cert-auth
247## Enable peer client cert authentication.
248## default: false
249# ETCD_PEER_CLIENT_CERT_AUTH
250
251##### -peer-trusted-ca-file
252## Path to the peer server TLS trusted CA file.
253## default: none
254# ETCD_PEER_TRUSTED_CA_FILE
255
256### Logging Flags
257##### -debug
258## Drop the default log level to DEBUG for all subpackages.
259## default: false (INFO for all packages)
260# ETCD_DEBUG
261
262##### -log-package-levels
263## Set individual etcd subpackages to specific log levels.
264## An example being `etcdserver=WARNING,security=DEBUG`
265## default: none (INFO for all packages)
266# ETCD_LOG_PACKAGE_LEVELS
267
268
269#### Daemon parameters:
270# DAEMON_ARGS=""
Pavel Cizinskyc45f6de2016-09-22 13:25:47 +0200271{% endif %}