11
11
# This is the only input needed to be able to add the host as a member of the cluster. The format of this field
12
12
# is available in the [inputs file](https://github.com/megabyte-labs/install.doctor/blob/master/home/.chezmoi.yaml.tmpl).
13
13
#
14
+ # Certificates should be stored in `home/.chezmoitemplates/files/etcd` folder. These files are to be encrypted following
15
+ # our Secrets documentation.
16
+ #
14
17
# ## Configuration Variables
15
18
#
16
19
# The following chart details the input variable(s) that are used to join the host to `etcd` cluster:
17
20
#
18
21
# | Variable | Description |
19
22
# |------------------------------|------------------------------------------------------------|
20
23
# | `etcd.initial_cluster_urls` | Appropriately formatted initial cluster configuration |
24
+ #
25
+ # ## Links
26
+ #
27
+ # * [Default Endlessh configuration](https://github.com/megabyte-labs/install.doctor/tree/master/home/private_dot_ssh/endlessh/config.tmpl)
28
+ # * [Secrets / Environment variables documentation](https://install.doctor/docs/customization/secrets)
21
29
22
30
{{ includeTemplate "universal/profile-before" }}
23
31
{{ includeTemplate "universal/logg-before" }}
@@ -31,6 +39,14 @@ if command -v etcd > /dev/null; then
31
39
--advertise-client-urls http://$(hostname -i):2379 --listen-client-urls http://$(hostname -i):2379 \
32
40
--initial-cluster "{{ .etcd.initial_cluster_urls }}" \
33
41
--initial-cluster-state existing
42
+ --client-cert-auth \
43
+ --trusted-ca-file "${XDG_DATA_HOME:-$HOME/.local/share}/etcd/ca-etcd-chain-cert.pem" \
44
+ --cert-file "${XDG_DATA_HOME:-$HOME/.local/share}/etcd/server-cert.pem" \
45
+ --key-file "${XDG_DATA_HOME:-$HOME/.local/share}/etcd/server-key.pem" \
46
+ --peer-client-cert-auth \
47
+ --peer-trusted-ca-file "${XDG_DATA_HOME:-$HOME/.local/share}/etcd/ca-etcd-chain-cert.pem" \
48
+ --peer-cert-file "${XDG_DATA_HOME:-$HOME/.local/share}/etcd/peer-cert.pem" \
49
+ --peer-key-file "${XDG_DATA_HOME:-$HOME/.local/share}/etcd/peer-key.pem"
34
50
{{ end }}
35
51
else
36
52
logg info 'etcd is not installed or it is not available in the PATH'
0 commit comments