mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #63151 from YonatanKiron/enable-local-cluster-port-range
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Add optional flag of node port range **What this PR does / why we need it**: Add option of setting port range when using hack/local-up-cluster.sh **Which issue(s) this PR fixes** Inability to set port range flag **Release note**: ```release-note NONE ```
This commit is contained in:
		@@ -219,6 +219,7 @@ API_SECURE_PORT=${API_SECURE_PORT:-6443}
 | 
			
		||||
API_HOST=${API_HOST:-localhost}
 | 
			
		||||
API_HOST_IP=${API_HOST_IP:-"127.0.0.1"}
 | 
			
		||||
ADVERTISE_ADDRESS=${ADVERTISE_ADDRESS:-""}
 | 
			
		||||
NODE_PORT_RANGE=${NODE_PORT_RANGE:-""}
 | 
			
		||||
API_BIND_ADDR=${API_BIND_ADDR:-"0.0.0.0"}
 | 
			
		||||
EXTERNAL_HOSTNAME=${EXTERNAL_HOSTNAME:-localhost}
 | 
			
		||||
 | 
			
		||||
@@ -533,6 +534,10 @@ function start_apiserver {
 | 
			
		||||
    if [[ "${ADVERTISE_ADDRESS}" != "" ]] ; then
 | 
			
		||||
        advertise_address="--advertise-address=${ADVERTISE_ADDRESS}"
 | 
			
		||||
    fi
 | 
			
		||||
    node_port_range=""
 | 
			
		||||
    if [[ "${NODE_PORT_RANGE}" != "" ]] ; then
 | 
			
		||||
        node_port_range="--service-node-port-range=${NODE_PORT_RANGE}"
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Create CA signers
 | 
			
		||||
    if [[ "${ENABLE_SINGLE_CA_SIGNER:-}" = true ]]; then
 | 
			
		||||
@@ -574,6 +579,7 @@ function start_apiserver {
 | 
			
		||||
    ${CONTROLPLANE_SUDO} "${GO_OUT}/hyperkube" apiserver ${swagger_arg} ${audit_arg} ${authorizer_arg} ${priv_arg} ${runtime_config} \
 | 
			
		||||
      ${cloud_config_arg} \
 | 
			
		||||
      ${advertise_address} \
 | 
			
		||||
      ${node_port_range} \
 | 
			
		||||
      --v=${LOG_LEVEL} \
 | 
			
		||||
      --vmodule="${LOG_SPEC}" \
 | 
			
		||||
      --cert-dir="${CERT_DIR}" \
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user