[COMMON][ETCD] Skip startup self-discovery for etcd nodes
[oom.git] / kubernetes / common / etcd / templates / statefulset.yaml
index 96cda89..b09e7c6 100644 (file)
@@ -128,6 +128,10 @@ spec:
             # we should wait for other pods to be up before trying to join
             # otherwise we got "no such host" errors when trying to resolve other members
             for i in $(seq 0 $((${INITIAL_CLUSTER_SIZE} - 1))); do
+                if [ "${SET_NAME}-${i}" == "${HOSTNAME}" ]; then
+                    echo "Skipping self-checking"
+                    continue
+                fi
                 while true; do
                     echo "Waiting for ${SET_NAME}-${i}.${SERVICE_NAME} to come up"
                     ping -W 1 -c 1 ${SET_NAME}-${i}.${SERVICE_NAME} > /dev/null && break