Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a comment to keep etcd name in sync and change hostname to HOSTNAME #91964

Merged
merged 1 commit into from Jun 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions cluster/gce/manifests/etcd.manifest
Expand Up @@ -53,6 +53,9 @@
},
{ "name": "ETCD_SNAPSHOT_COUNT",
"value": "10000"
},
{ "name": "ETCD_HOSTNAME",
"value": "{{ hostname }}"
wojtek-t marked this conversation as resolved.
Show resolved Hide resolved
}
],
"livenessProbe": {
Expand Down
3 changes: 2 additions & 1 deletion cluster/images/etcd/migrate-if-needed.sh
Expand Up @@ -46,7 +46,8 @@ set -o nounset
BUNDLED_VERSIONS="3.0.17, 3.1.12, 3.2.24, 3.3.17, 3.4.7"

# shellcheck disable=SC2039
ETCD_NAME="${ETCD_NAME:-etcd-${ETCD_HOSTNAME:-$(hostname -s)}}"
# 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
wojtek-t marked this conversation as resolved.
Show resolved Hide resolved
ETCD_NAME="${ETCD_NAME:-etcd-${ETCD_HOSTNAME:-$HOSTNAME}}"
wojtek-t marked this conversation as resolved.
Show resolved Hide resolved
wojtek-t marked this conversation as resolved.
Show resolved Hide resolved
if [ -z "${DATA_DIRECTORY:-}" ]; then
echo "DATA_DIRECTORY variable unset - unexpected failure"
exit 1
Expand Down