Skip to content

Commit 0da9c3e

Browse files
committed
Add a comment to keep etcd name in sync and change hostname to HOSTNAME
1 parent 875f31e commit 0da9c3e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cluster/gce/manifests/etcd.manifest

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353
},
5454
{ "name": "ETCD_SNAPSHOT_COUNT",
5555
"value": "10000"
56+
},
57+
{ "name": "ETCD_HOSTNAME",
58+
"value": "{{ hostname }}"
5659
}
5760
],
5861
"livenessProbe": {

cluster/images/etcd/migrate-if-needed.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ set -o nounset
4646
BUNDLED_VERSIONS="3.0.17, 3.1.12, 3.2.24, 3.3.17, 3.4.7"
4747

4848
# shellcheck disable=SC2039
49-
ETCD_NAME="${ETCD_NAME:-etcd-${ETCD_HOSTNAME:-$(hostname -s)}}"
49+
# NOTE: Make sure the resulted ETCD_NAME agrees with --name in etcd.manifest: https://github.com/kubernetes/kubernetes/blob/e7ca64fbe16d0c4b6c7b36aecde9cd75042b2828/cluster/gce/manifests/etcd.manifest#L27
50+
ETCD_NAME="${ETCD_NAME:-etcd-${ETCD_HOSTNAME:-$HOSTNAME}}"
5051
if [ -z "${DATA_DIRECTORY:-}" ]; then
5152
echo "DATA_DIRECTORY variable unset - unexpected failure"
5253
exit 1

0 commit comments

Comments
 (0)