Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit dbd6bfe

Browse files
authored
Merge pull request #376 from hongchaodeng/f
*: fix etcd and kenc container command
2 parents ce4a38f + e5703ea commit dbd6bfe

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

pkg/asset/internal/templates.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,10 @@ spec:
232232
name: var-lock
233233
readOnly: false
234234
command:
235-
- "/bin/sh"
236-
- "-c"
237-
- "/usr/bin/flock --exclusive --timeout=30 /var/lock/kenc.lock; kenc -r -m iptables && kenc -m iptables"
235+
- /usr/bin/flock
236+
- /var/lock/kenc.lock
237+
- -c
238+
- "kenc -r -m iptables && kenc -m iptables"
238239
volumes:
239240
- name: checkpoint-dir
240241
hostPath:

pkg/util/etcdutil/start_etcd.go

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,16 @@ metadata:
4545
spec:
4646
containers:
4747
- command:
48-
- /bin/sh
49-
- -c
5048
- /usr/local/bin/etcd
51-
--name boot-etcd
52-
--listen-client-urls=http://0.0.0.0:12379
53-
--listen-peer-urls=http://0.0.0.0:12380
54-
--advertise-client-urls=http://$(MY_POD_IP):12379
55-
--initial-advertise-peer-urls http://$(MY_POD_IP):12380
56-
--initial-cluster boot-etcd=http://$(MY_POD_IP):12380
57-
--initial-cluster-token bootkube
58-
--initial-cluster-state new
59-
--data-dir=/var/etcd/data
49+
- --name=boot-etcd
50+
- --listen-client-urls=http://0.0.0.0:12379
51+
- --listen-peer-urls=http://0.0.0.0:12380
52+
- --advertise-client-urls=http://$(MY_POD_IP):12379
53+
- --initial-advertise-peer-urls=http://$(MY_POD_IP):12380
54+
- --initial-cluster=boot-etcd=http://$(MY_POD_IP):12380
55+
- --initial-cluster-token=bootkube
56+
- --initial-cluster-state=new
57+
- --data-dir=/var/etcd/data
6058
env:
6159
- name: MY_POD_IP
6260
valueFrom:

0 commit comments

Comments
 (0)