mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #109269 from liggitt/local-up-nokubelet-noproxy
Fix local-up-cluster for running only an API server
This commit is contained in:
commit
00bd91e558
@ -125,7 +125,7 @@ ENABLE_ADMISSION_PLUGINS=${ENABLE_ADMISSION_PLUGINS:-"NamespaceLifecycle,LimitRa
|
|||||||
DISABLE_ADMISSION_PLUGINS=${DISABLE_ADMISSION_PLUGINS:-""}
|
DISABLE_ADMISSION_PLUGINS=${DISABLE_ADMISSION_PLUGINS:-""}
|
||||||
ADMISSION_CONTROL_CONFIG_FILE=${ADMISSION_CONTROL_CONFIG_FILE:-""}
|
ADMISSION_CONTROL_CONFIG_FILE=${ADMISSION_CONTROL_CONFIG_FILE:-""}
|
||||||
|
|
||||||
# START_MODE can be 'all', 'kubeletonly', 'nokubelet', or 'nokubeproxy'
|
# START_MODE can be 'all', 'kubeletonly', 'nokubelet', 'nokubeproxy', or 'nokubelet,nokubeproxy'
|
||||||
START_MODE=${START_MODE:-"all"}
|
START_MODE=${START_MODE:-"all"}
|
||||||
|
|
||||||
# A list of controllers to enable
|
# A list of controllers to enable
|
||||||
@ -836,7 +836,7 @@ EOF
|
|||||||
function start_kubeproxy {
|
function start_kubeproxy {
|
||||||
PROXY_LOG=${LOG_DIR}/kube-proxy.log
|
PROXY_LOG=${LOG_DIR}/kube-proxy.log
|
||||||
|
|
||||||
if [[ "${START_MODE}" != "nokubelet" ]]; then
|
if [[ "${START_MODE}" != *"nokubelet"* ]]; then
|
||||||
# wait for kubelet collect node information
|
# wait for kubelet collect node information
|
||||||
echo "wait kubelet ready"
|
echo "wait kubelet ready"
|
||||||
wait_node_ready
|
wait_node_ready
|
||||||
@ -981,7 +981,7 @@ fi
|
|||||||
|
|
||||||
if [[ "${START_MODE}" == "all" ]]; then
|
if [[ "${START_MODE}" == "all" ]]; then
|
||||||
echo " ${KUBELET_LOG}"
|
echo " ${KUBELET_LOG}"
|
||||||
elif [[ "${START_MODE}" == "nokubelet" ]]; then
|
elif [[ "${START_MODE}" == *"nokubelet"* ]]; then
|
||||||
echo
|
echo
|
||||||
echo "No kubelet was started because you set START_MODE=nokubelet"
|
echo "No kubelet was started because you set START_MODE=nokubelet"
|
||||||
echo "Run this script again with START_MODE=kubeletonly to run a kubelet"
|
echo "Run this script again with START_MODE=kubeletonly to run a kubelet"
|
||||||
@ -1172,8 +1172,7 @@ if [[ "${START_MODE}" != "kubeletonly" ]]; then
|
|||||||
start_csi_snapshotter
|
start_csi_snapshotter
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${START_MODE}" != "nokubelet" ]]; then
|
if [[ "${START_MODE}" != *"nokubelet"* ]]; then
|
||||||
install_cni_if_needed
|
|
||||||
## TODO remove this check if/when kubelet is supported on darwin
|
## TODO remove this check if/when kubelet is supported on darwin
|
||||||
# Detect the OS name/arch and display appropriate error.
|
# Detect the OS name/arch and display appropriate error.
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
@ -1182,6 +1181,7 @@ if [[ "${START_MODE}" != "nokubelet" ]]; then
|
|||||||
KUBELET_LOG=""
|
KUBELET_LOG=""
|
||||||
;;
|
;;
|
||||||
Linux)
|
Linux)
|
||||||
|
install_cni_if_needed
|
||||||
start_kubelet
|
start_kubelet
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -1191,7 +1191,7 @@ if [[ "${START_MODE}" != "nokubelet" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${START_MODE}" != "kubeletonly" ]]; then
|
if [[ "${START_MODE}" != "kubeletonly" ]]; then
|
||||||
if [[ "${START_MODE}" != "nokubeproxy" ]]; then
|
if [[ "${START_MODE}" != *"nokubeproxy"* ]]; then
|
||||||
## TODO remove this check if/when kubelet is supported on darwin
|
## TODO remove this check if/when kubelet is supported on darwin
|
||||||
# Detect the OS name/arch and display appropriate error.
|
# Detect the OS name/arch and display appropriate error.
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
|
Loading…
Reference in New Issue
Block a user