mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
Allow for configuring etcd servers
This commit is contained in:
parent
8aea674681
commit
122b7a5f82
@ -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}"
|
||||
|
@ -1071,6 +1071,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