mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #54403 from wojtek-t/dont_hardcode_etcd_hostname
Automatic merge from submit-queue (batch tested with PRs 54400, 54403). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Allow for configuring etcd hostname in the manifest ```release-note Allow for configuring etcd hostname in the manifest ```
This commit is contained in:
commit
060b4b8b84
@ -842,6 +842,11 @@ EOF
|
|||||||
if [ -n "${ETCD_VERSION:-}" ]; then
|
if [ -n "${ETCD_VERSION:-}" ]; then
|
||||||
cat >>$file <<EOF
|
cat >>$file <<EOF
|
||||||
ETCD_VERSION: $(yaml-quote ${ETCD_VERSION})
|
ETCD_VERSION: $(yaml-quote ${ETCD_VERSION})
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
if [ -n "${ETCD_HOSTNAME:-}" ]; then
|
||||||
|
cat >>$file <<EOF
|
||||||
|
ETCD_HOSTNAME: $(yaml-quote ${ETCD_HOSTNAME})
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
if [ -n "${APISERVER_TEST_ARGS:-}" ]; then
|
if [ -n "${APISERVER_TEST_ARGS:-}" ]; then
|
||||||
|
@ -447,7 +447,7 @@ kube_uid: '$(echo "${KUBE_UID}" | sed -e "s/'/''/g")'
|
|||||||
initial_etcd_cluster: '$(echo "${INITIAL_ETCD_CLUSTER:-}" | sed -e "s/'/''/g")'
|
initial_etcd_cluster: '$(echo "${INITIAL_ETCD_CLUSTER:-}" | sed -e "s/'/''/g")'
|
||||||
initial_etcd_cluster_state: '$(echo "${INITIAL_ETCD_CLUSTER_STATE:-}" | sed -e "s/'/''/g")'
|
initial_etcd_cluster_state: '$(echo "${INITIAL_ETCD_CLUSTER_STATE:-}" | sed -e "s/'/''/g")'
|
||||||
ca_cert_bundle_path: '$(echo "${CA_CERT_BUNDLE_PATH:-}" | sed -e "s/'/''/g")'
|
ca_cert_bundle_path: '$(echo "${CA_CERT_BUNDLE_PATH:-}" | sed -e "s/'/''/g")'
|
||||||
hostname: $(hostname -s)
|
hostname: '$(echo "${ETCD_HOSTNAME:-$(hostname -s)}" | sed -e "s/'/''/g")'
|
||||||
enable_pod_priority: '$(echo "${ENABLE_POD_PRIORITY:-}" | sed -e "s/'/''/g")'
|
enable_pod_priority: '$(echo "${ENABLE_POD_PRIORITY:-}" | sed -e "s/'/''/g")'
|
||||||
enable_default_storage_class: '$(echo "$ENABLE_DEFAULT_STORAGE_CLASS" | sed -e "s/'/''/g")'
|
enable_default_storage_class: '$(echo "$ENABLE_DEFAULT_STORAGE_CLASS" | sed -e "s/'/''/g")'
|
||||||
kube_proxy_daemonset: '$(echo "$KUBE_PROXY_DAEMONSET" | sed -e "s/'/''/g")'
|
kube_proxy_daemonset: '$(echo "$KUBE_PROXY_DAEMONSET" | sed -e "s/'/''/g")'
|
||||||
|
@ -730,7 +730,7 @@ function start-kube-proxy {
|
|||||||
# $4: value for variable 'cpulimit'
|
# $4: value for variable 'cpulimit'
|
||||||
# $5: pod name, which should be either etcd or etcd-events
|
# $5: pod name, which should be either etcd or etcd-events
|
||||||
function prepare-etcd-manifest {
|
function prepare-etcd-manifest {
|
||||||
local host_name=$(hostname -s)
|
local host_name=${ETCD_HOSTNAME:-$(hostname -s)}
|
||||||
local etcd_cluster=""
|
local etcd_cluster=""
|
||||||
local cluster_state="new"
|
local cluster_state="new"
|
||||||
local etcd_protocol="http"
|
local etcd_protocol="http"
|
||||||
|
@ -1119,7 +1119,7 @@ function start-kube-proxy {
|
|||||||
# $4: value for variable 'cpulimit'
|
# $4: value for variable 'cpulimit'
|
||||||
# $5: pod name, which should be either etcd or etcd-events
|
# $5: pod name, which should be either etcd or etcd-events
|
||||||
function prepare-etcd-manifest {
|
function prepare-etcd-manifest {
|
||||||
local host_name=$(hostname)
|
local host_name=${ETCD_HOSTNAME:-$(hostname -s)}
|
||||||
local etcd_cluster=""
|
local etcd_cluster=""
|
||||||
local cluster_state="new"
|
local cluster_state="new"
|
||||||
local etcd_protocol="http"
|
local etcd_protocol="http"
|
||||||
|
Loading…
Reference in New Issue
Block a user