mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Merge pull request #102544 from jeremyje/fixnpd
GCE Windows: Only create NPD kubeconfig when the file path is defined.
This commit is contained in:
commit
2cefcc6be7
@ -1719,7 +1719,7 @@ function DownloadAndInstall-NodeProblemDetector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Creates the node-problem-detector user kubeconfig file at
|
# Creates the node-problem-detector user kubeconfig file at
|
||||||
# $env:NODEPROBLEMDETECTOR_KUBECONFIG_FILE.
|
# $env:NODEPROBLEMDETECTOR_KUBECONFIG_FILE (if defined).
|
||||||
#
|
#
|
||||||
# Create-NodePki() must be called first.
|
# Create-NodePki() must be called first.
|
||||||
#
|
#
|
||||||
@ -1727,10 +1727,12 @@ function DownloadAndInstall-NodeProblemDetector {
|
|||||||
# CA_CERT
|
# CA_CERT
|
||||||
# NODE_PROBLEM_DETECTOR_TOKEN
|
# NODE_PROBLEM_DETECTOR_TOKEN
|
||||||
function Create-NodeProblemDetectorKubeConfig {
|
function Create-NodeProblemDetectorKubeConfig {
|
||||||
|
if (-not [string]::IsNullOrEmpty(${env:NODEPROBLEMDETECTOR_KUBECONFIG_FILE})) {
|
||||||
Create-Kubeconfig -Name 'node-problem-detector' `
|
Create-Kubeconfig -Name 'node-problem-detector' `
|
||||||
-Path ${env:NODEPROBLEMDETECTOR_KUBECONFIG_FILE} `
|
-Path ${env:NODEPROBLEMDETECTOR_KUBECONFIG_FILE} `
|
||||||
-Token ${kube_env}['NODE_PROBLEM_DETECTOR_TOKEN']
|
-Token ${kube_env}['NODE_PROBLEM_DETECTOR_TOKEN']
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Configures NPD to run with the bundled monitor configs and report against the Kubernetes api server.
|
# Configures NPD to run with the bundled monitor configs and report against the Kubernetes api server.
|
||||||
function Configure-NodeProblemDetector {
|
function Configure-NodeProblemDetector {
|
||||||
|
Loading…
Reference in New Issue
Block a user