File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424# wait until etcd has discarded potentially stale values
2525sleep $(( $ETCD_TTL + 1 ))
2626
27- function etcd_safe_set {
28- if ! etcdctl --no-sync -C $ETCD get $ETCD_PATH /$1 > /dev/null 2>&1 ; then
29- etcdctl --no-sync -C $ETCD set $ETCD_PATH /$1 $2 > /dev/null
30- fi
27+ function etcd_set_default {
28+ etcdctl --no-sync -C $ETCD mk $ETCD_PATH /$1 $2 > /dev/null 2>&1 || true
3129}
3230
33- etcd_safe_set protocol ${DEIS_PROTOCOL:- http}
34- etcd_safe_set secretKey ${DEIS_SECRET_KEY:- `openssl rand -base64 64 | tr -d ' \n' `}
35- etcd_safe_set builderKey ${DEIS_BUILDER_KEY:- `openssl rand -base64 64 | tr -d ' \n' `}
36- etcd_safe_set registrationEnabled 1
37- etcd_safe_set webEnabled 0
31+ etcd_set_default protocol ${DEIS_PROTOCOL:- http}
32+ etcd_set_default secretKey ${DEIS_SECRET_KEY:- `openssl rand -base64 64 | tr -d ' \n' `}
33+ etcd_set_default builderKey ${DEIS_BUILDER_KEY:- `openssl rand -base64 64 | tr -d ' \n' `}
34+ etcd_set_default registrationEnabled 1
35+ etcd_set_default webEnabled 0
3836
3937# wait for confd to run once and install initial templates
4038until confd -onetime -node $ETCD -config-file /app/confd.toml 2> /dev/null; do
You can’t perform that action at this time.
0 commit comments