This repository was archived by the owner on Sep 30, 2020. It is now read-only.
File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ coreos:
31
31
Environment=ETCD_LISTEN_PEER_URLS=https://%H:2380
32
32
Environment=ETCD_INITIAL_ADVERTISE_PEER_URLS=https://%H:2380
33
33
PermissionsStartOnly=true
34
+ ExecStartPre=/usr/bin/bash -c "sed -i \"s/^ETCDCTL_ENDPOINT.*$/ETCDCTL_ENDPOINT=https:\/\/$(hostname):2379/\" /etc/environment"
34
35
ExecStartPre=/usr/bin/chown -R etcd:etcd /var/lib/etcd2
35
36
enable: true
36
37
command: start
@@ -86,6 +87,17 @@ coreos:
86
87
87
88
88
89
write_files:
90
+
91
+ - path: /etc/environment
92
+ permissions: 0644
93
+ content: |
94
+ COREOS_PUBLIC_IPV4=$public_ipv4
95
+ COREOS_PRIVATE_IPV4=$private_ipv4
96
+ ETCDCTL_CA_FILE=/etc/etcd2/ssl/ca.pem
97
+ ETCDCTL_CERT_FILE=/etc/etcd2/ssl/etcd-client.pem
98
+ ETCDCTL_KEY_FILE=/etc/etcd2/ssl/etcd-client-key.pem
99
+ ETCDCTL_ENDPOINT=
100
+
89
101
- path: /opt/bin/ext4-format-volume-once
90
102
permissions: 0700
91
103
owner: root:root
@@ -120,3 +132,11 @@ write_files:
120
132
- path: /etc/etcd2/ssl/etcd.pem.enc
121
133
encoding: gzip+base64
122
134
content: {{.TLSConfig.EtcdCert}}
135
+
136
+ - path: /etc/etcd2/ssl/etcd-client.pem.enc
137
+ encoding: gzip+base64
138
+ content: {{.TLSConfig.EtcdClientCert}}
139
+
140
+ - path: /etc/etcd2/ssl/etcd-client-key.pem.enc
141
+ encoding: gzip+base64
142
+ content: {{.TLSConfig.EtcdClientKey}}
You can’t perform that action at this time.
0 commit comments