mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Modify kube-up to support cluster without nodes.
This commit is contained in:
parent
9f85c5c4b5
commit
5f10c284c8
@ -41,6 +41,10 @@ NODE_LOCAL_SSDS=${NODE_LOCAL_SSDS:-0}
|
|||||||
NODE_LABELS="${KUBE_NODE_LABELS:-}"
|
NODE_LABELS="${KUBE_NODE_LABELS:-}"
|
||||||
WINDOWS_NODE_LABELS="${WINDOWS_NODE_LABELS:-}"
|
WINDOWS_NODE_LABELS="${WINDOWS_NODE_LABELS:-}"
|
||||||
|
|
||||||
|
# KUBE_CREATE_NODES can be used to avoid creating nodes, while master will be sized for NUM_NODES nodes.
|
||||||
|
# Firewalls and node templates are still created.
|
||||||
|
KUBE_CREATE_NODES="${KUBE_CREATE_NODES:-true}"
|
||||||
|
|
||||||
# An extension to local SSDs allowing users to specify block/fs and SCSI/NVMe devices
|
# An extension to local SSDs allowing users to specify block/fs and SCSI/NVMe devices
|
||||||
# Format of this variable will be "#,scsi/nvme,block/fs" you can specify multiple
|
# Format of this variable will be "#,scsi/nvme,block/fs" you can specify multiple
|
||||||
# configurations by separating them by a semi-colon ex. "2,scsi,fs;1,nvme,block"
|
# configurations by separating them by a semi-colon ex. "2,scsi,fs;1,nvme,block"
|
||||||
|
@ -41,6 +41,10 @@ NODE_LOCAL_SSDS=${NODE_LOCAL_SSDS:-0}
|
|||||||
NODE_LABELS="${KUBE_NODE_LABELS:-}"
|
NODE_LABELS="${KUBE_NODE_LABELS:-}"
|
||||||
WINDOWS_NODE_LABELS="${WINDOWS_NODE_LABELS:-}"
|
WINDOWS_NODE_LABELS="${WINDOWS_NODE_LABELS:-}"
|
||||||
|
|
||||||
|
# KUBE_CREATE_NODES can be used to avoid creating nodes, while master will be sized for NUM_NODES nodes.
|
||||||
|
# Firewalls and node templates are still created.
|
||||||
|
KUBE_CREATE_NODES="${KUBE_CREATE_NODES:-true}"
|
||||||
|
|
||||||
# An extension to local SSDs allowing users to specify block/fs and SCSI/NVMe devices
|
# An extension to local SSDs allowing users to specify block/fs and SCSI/NVMe devices
|
||||||
# Format of this variable will be "#,scsi/nvme,block/fs" you can specify multiple
|
# Format of this variable will be "#,scsi/nvme,block/fs" you can specify multiple
|
||||||
# configurations by separating them by a semi-colon ex. "2,scsi,fs;1,nvme,block"
|
# configurations by separating them by a semi-colon ex. "2,scsi,fs;1,nvme,block"
|
||||||
|
@ -2134,9 +2134,11 @@ function kube-up() {
|
|||||||
create-master
|
create-master
|
||||||
create-nodes-firewall
|
create-nodes-firewall
|
||||||
create-nodes-template
|
create-nodes-template
|
||||||
|
if [[ "${KUBE_CREATE_NODES}" == "true" ]]; then
|
||||||
# Windows nodes take longer to boot and setup so create them first.
|
# Windows nodes take longer to boot and setup so create them first.
|
||||||
create-windows-nodes
|
create-windows-nodes
|
||||||
create-linux-nodes
|
create-linux-nodes
|
||||||
|
fi
|
||||||
check-cluster
|
check-cluster
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,11 @@ ALLOWED_NOTREADY_NODES="${ALLOWED_NOTREADY_NODES:-0}"
|
|||||||
CLUSTER_READY_ADDITIONAL_TIME_SECONDS="${CLUSTER_READY_ADDITIONAL_TIME_SECONDS:-30}"
|
CLUSTER_READY_ADDITIONAL_TIME_SECONDS="${CLUSTER_READY_ADDITIONAL_TIME_SECONDS:-30}"
|
||||||
|
|
||||||
if [[ "${KUBERNETES_PROVIDER:-}" == "gce" ]]; then
|
if [[ "${KUBERNETES_PROVIDER:-}" == "gce" ]]; then
|
||||||
|
if [[ "${KUBE_CREATE_NODES}" == "true" ]]; then
|
||||||
EXPECTED_NUM_NODES="$(get-num-nodes)"
|
EXPECTED_NUM_NODES="$(get-num-nodes)"
|
||||||
|
else
|
||||||
|
EXPECTED_NUM_NODES="0"
|
||||||
|
fi
|
||||||
echo "Validating gce cluster, MULTIZONE=${MULTIZONE:-}"
|
echo "Validating gce cluster, MULTIZONE=${MULTIZONE:-}"
|
||||||
# In multizone mode we need to add instances for all nodes in the region.
|
# In multizone mode we need to add instances for all nodes in the region.
|
||||||
if [[ "${MULTIZONE:-}" == "true" ]]; then
|
if [[ "${MULTIZONE:-}" == "true" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user