mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #68120 from wojtek-t/configurable_etcd_servers
Automatic merge from submit-queue (batch tested with PRs 67756, 64149, 68076, 68131, 68120). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md. Allow for configuring etcd servers addresses in gce
This commit is contained in:
commit
eff30a31a7
@ -1461,8 +1461,12 @@ function start-kube-apiserver {
|
||||
params+=" --allow-privileged=true"
|
||||
params+=" --cloud-provider=gce"
|
||||
params+=" --client-ca-file=${CA_CERT_BUNDLE_PATH}"
|
||||
params+=" --etcd-servers=http://127.0.0.1:2379"
|
||||
params+=" --etcd-servers-overrides=/events#http://127.0.0.1:4002"
|
||||
params+=" --etcd-servers=${ETCD_SERVERS:-http://127.0.0.1:2379}"
|
||||
if [[ -z "${ETCD_SERVERS:-}" ]]; then
|
||||
params+=" --etcd-servers-overrides=${ETCD_SERVERS_OVERRIDES:-/events#http://127.0.0.1:4002}"
|
||||
elif [[ -n "${ETCD_SERVERS_OVERRIDES:-}" ]]; then
|
||||
params+=" --etcd-servers-overrides=${ETCD_SERVERS_OVERRIDES:-}"
|
||||
fi
|
||||
params+=" --secure-port=443"
|
||||
params+=" --tls-cert-file=${APISERVER_SERVER_CERT_PATH}"
|
||||
params+=" --tls-private-key-file=${APISERVER_SERVER_KEY_PATH}"
|
||||
|
@ -1070,6 +1070,16 @@ EOF
|
||||
if [ -n "${ETCD_EXTRA_ARGS:-}" ]; then
|
||||
cat >>$file <<EOF
|
||||
ETCD_EXTRA_ARGS: $(yaml-quote ${ETCD_EXTRA_ARGS})
|
||||
EOF
|
||||
fi
|
||||
if [ -n "${ETCD_SERVERS:-}" ]; then
|
||||
cat >>$file <<EOF
|
||||
ETCD_SERVERS: $(yaml-quote ${ETCD_SERVERS})
|
||||
EOF
|
||||
fi
|
||||
if [ -n "${ETCD_SERVERS_OVERRIDES:-}" ]; then
|
||||
cat >>$file <<EOF
|
||||
ETCD_SERVERS_OVERRIDES: $(yaml-quote ${ETCD_SERVERS_OVERRIDES})
|
||||
EOF
|
||||
fi
|
||||
if [ -n "${APISERVER_TEST_ARGS:-}" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user