Merge pull request #65342 from dashpole/npd_args
Automatic merge from submit-queue (batch tested with PRs 65342, 65460). 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>. Update NPD config for GCI **What this PR does / why we need it**: Use https://github.com/kubernetes/node-problem-detector/pull/180 on GCI **Special notes for your reviewer**: This is currently pending an NPD release. **Release note**: ```release-note NONE ``` /assign @Random-Liu /sig node /kind feature /priority important-soon
This commit is contained in:
		@@ -1181,13 +1181,18 @@ function start-node-problem-detector {
 | 
			
		||||
  local -r km_config="${KUBE_HOME}/node-problem-detector/config/kernel-monitor.json"
 | 
			
		||||
  # TODO(random-liu): Handle this for alternative container runtime.
 | 
			
		||||
  local -r dm_config="${KUBE_HOME}/node-problem-detector/config/docker-monitor.json"
 | 
			
		||||
  local -r custom_km_config="${KUBE_HOME}/node-problem-detector/config/kernel-monitor-counter.json"
 | 
			
		||||
  echo "Using node problem detector binary at ${npd_bin}"
 | 
			
		||||
  local flags="${NPD_TEST_LOG_LEVEL:-"--v=2"} ${NPD_TEST_ARGS:-}"
 | 
			
		||||
  flags+=" --logtostderr"
 | 
			
		||||
  flags+=" --system-log-monitors=${km_config},${dm_config}"
 | 
			
		||||
  flags+=" --custom-plugin-monitors=${custom_km_config}"
 | 
			
		||||
  flags+=" --apiserver-override=https://${KUBERNETES_MASTER_NAME}?inClusterConfig=false&auth=/var/lib/node-problem-detector/kubeconfig"
 | 
			
		||||
  local -r npd_port=${NODE_PROBLEM_DETECTOR_PORT:-20256}
 | 
			
		||||
  flags+=" --port=${npd_port}"
 | 
			
		||||
  if [[ -n "${EXTRA_NPD_ARGS:-}" ]]; then
 | 
			
		||||
    flags+=" ${EXTRA_NPD_ARGS}"
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Write the systemd service file for node problem detector.
 | 
			
		||||
  cat <<EOF >/etc/systemd/system/node-problem-detector.service
 | 
			
		||||
 
 | 
			
		||||
@@ -26,8 +26,8 @@ set -o pipefail
 | 
			
		||||
### Hardcoded constants
 | 
			
		||||
DEFAULT_CNI_VERSION="v0.6.0"
 | 
			
		||||
DEFAULT_CNI_SHA1="d595d3ded6499a64e8dac02466e2f5f2ce257c9f"
 | 
			
		||||
DEFAULT_NPD_VERSION="v0.4.1"
 | 
			
		||||
DEFAULT_NPD_SHA1="a57a3fe64cab8a18ec654f5cef0aec59dae62568"
 | 
			
		||||
DEFAULT_NPD_VERSION="v0.5.0"
 | 
			
		||||
DEFAULT_NPD_SHA1="650ecfb2ae495175ee43706d0bd862a1ea7f1395"
 | 
			
		||||
DEFAULT_CRICTL_VERSION="v1.11.0"
 | 
			
		||||
DEFAULT_CRICTL_SHA1="8f5142b985d314cdebb51afd55054d5ec00c442a"
 | 
			
		||||
DEFAULT_MOUNTER_TAR_SHA="8003b798cf33c7f91320cd6ee5cec4fa22244571"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user