mirror of https://github.com/k3s-io/k3s
Add KUBE_GCE_API_ENDPOINT for GCE API endpoint config.
parent
890d356d5c
commit
b3956a689e
|
@ -665,6 +665,7 @@ ENABLE_APISERVER_BASIC_AUDIT: $(yaml-quote ${ENABLE_APISERVER_BASIC_AUDIT:-})
|
|||
ENABLE_APISERVER_ADVANCED_AUDIT: $(yaml-quote ${ENABLE_APISERVER_ADVANCED_AUDIT:-})
|
||||
ENABLE_CACHE_MUTATION_DETECTOR: $(yaml-quote ${ENABLE_CACHE_MUTATION_DETECTOR:-false})
|
||||
ADVANCED_AUDIT_BACKEND: $(yaml-quote ${ADVANCED_AUDIT_BACKEND:-log})
|
||||
KUBE_GCE_API_ENDPOINT: $(yaml-quote ${KUBE_GCE_API_ENDPOINT:-})
|
||||
EOF
|
||||
if [ -n "${KUBELET_PORT:-}" ]; then
|
||||
cat >>$file <<EOF
|
||||
|
|
|
@ -72,6 +72,7 @@ GCI_VERSION=${KUBE_GCI_VERSION:-cos-stable-59-9460-64-0}
|
|||
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-}
|
||||
MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-cos-cloud}
|
||||
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-${CVM_VERSION}}
|
||||
KUBE_GCE_API_ENDPOINT=${KUBE_GCE_API_ENDPOINT:-}
|
||||
NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-cos-cloud}
|
||||
CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker}
|
||||
RKT_VERSION=${KUBE_RKT_VERSION:-1.23.0}
|
||||
|
@ -125,7 +126,7 @@ ENABLE_CLUSTER_MONITORING="${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}"
|
|||
# TODO(piosz): remove this in 1.8
|
||||
NODE_LABELS="${KUBE_NODE_LABELS:-beta.kubernetes.io/fluentd-ds-ready=true}"
|
||||
|
||||
# To avoid running Calico on a node that is not configured appropriately,
|
||||
# To avoid running Calico on a node that is not configured appropriately,
|
||||
# label each Node so that the DaemonSet can run the Pods only on ready Nodes.
|
||||
if [[ ${NETWORK_POLICY_PROVIDER:-} == "calico" ]]; then
|
||||
NODE_LABELS="${NODE_LABELS},projectcalico.org/ds-ready=true"
|
||||
|
|
|
@ -379,6 +379,11 @@ function create-master-auth {
|
|||
cat <<EOF >/etc/gce.conf
|
||||
[global]
|
||||
EOF
|
||||
if [[ -n "${KUBE_GCE_API_ENDPOINT:-}" ]]; then
|
||||
cat <<EOF >>/etc/gce.conf
|
||||
api-endpoint = ${KUBE_GCE_API_ENDPOINT}
|
||||
EOF
|
||||
fi
|
||||
if [[ -n "${PROJECT_ID:-}" && -n "${TOKEN_URL:-}" && -n "${TOKEN_BODY:-}" && -n "${NODE_NETWORK:-}" ]]; then
|
||||
use_cloud_config="true"
|
||||
cat <<EOF >>/etc/gce.conf
|
||||
|
@ -1695,7 +1700,7 @@ function start-kube-addons {
|
|||
sed -i -e "s@__CALICO_TYPHA_CPU__@$(get-calico-typha-cpu)@g" "${typha_dep_file}"
|
||||
sed -i -e "s@__CALICO_TYPHA_REPLICAS__@$(get-calico-typha-replicas)@g" "${typha_dep_file}"
|
||||
else
|
||||
# If not configured to use Calico, the set the typha replica count to 0, but only if the
|
||||
# If not configured to use Calico, the set the typha replica count to 0, but only if the
|
||||
# addon is present.
|
||||
local -r typha_dep_file="${dst_dir}/calico-policy-controller/typha-deployment.yaml"
|
||||
if [[ -e $typha_dep_file ]]; then
|
||||
|
|
Loading…
Reference in New Issue