Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions hack/create-kind-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ if [[ $# -gt 0 ]]; then
echo "Creates the kind cluster '${KIND_CLUSTER_NAME}' and a local registry container on port ${reg_port}."
echo
echo "Configured through the environment:"
echo " KIND_CLUSTER_NAME Name of the cluster to create (default: kind)."
echo " IP_FAMILY Address families for pods and Services: ipv4, ipv6 or dual (default: ipv4)."
echo " KIND_CLUSTER_NAME Name of the cluster to create (default: kind)."
echo " IP_FAMILY Address families for pods and Services: ipv4, ipv6 or dual (default: ipv4)."
echo " ATE_KIND_RESERVED_CPU CPU reserved for the kubelet and the system on each node (default: none)."
exit 0
;;
esac
Expand Down Expand Up @@ -124,6 +125,17 @@ kubeadmConfigPatches:
serializeImagePulls: false
maxParallelImagePulls: 4
EOF
# Hundreds of sandboxes per node can starve the kubelet's node heartbeat; after
# the 300 s toleration the taint manager evicts every pod on the node. Opt in to
# a CPU reservation for the kubelet and the system, e.g. ATE_KIND_RESERVED_CPU=2.
if [[ -n "${ATE_KIND_RESERVED_CPU:-}" ]]; then
cat <<EOF >> "${ROOT}/bin/kind-config.yaml"
systemReserved:
cpu: "${ATE_KIND_RESERVED_CPU}"
kubeReserved:
cpu: "${ATE_KIND_RESERVED_CPU}"
EOF
fi

echo "Deleting existing kind cluster '${KIND_CLUSTER_NAME}' if it exists..."
"${ROOT}"/hack/kind.sh delete cluster --name "${KIND_CLUSTER_NAME}" || true
Expand Down
Loading