mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
Fix windows node startup failures.
1. cd to root dir before removing temp installer path. It was failing because we were trying to remove while being in the same dir. 2. Expand variables in a regular string and use it in the command. Expansion was failing in single quotes.
This commit is contained in:
parent
fbe806ef9e
commit
847ae378ef
@ -1627,16 +1627,17 @@ function DownloadAndInstall-LoggingAgents {
|
|||||||
Log-Output 'Extracting Logging agent'
|
Log-Output 'Extracting Logging agent'
|
||||||
Expand-Archive td.zip
|
Expand-Archive td.zip
|
||||||
mv .\td\td-agent-bit-${LOGGINGAGENT_VERSION}-win64\ $LOGGINGAGENT_ROOT
|
mv .\td\td-agent-bit-${LOGGINGAGENT_VERSION}-win64\ $LOGGINGAGENT_ROOT
|
||||||
|
cd C:\
|
||||||
Remove-Item -Force -Recurse $install_dir
|
Remove-Item -Force -Recurse $install_dir
|
||||||
}
|
}
|
||||||
|
|
||||||
# Download Logging exporter if needed
|
# Download Logging exporter if needed
|
||||||
if (ShouldWrite-File $LOGGINGEXPORTER_ROOT\flb-exporter.exe) {
|
if (ShouldWrite-File $LOGGINGEXPORTER_ROOT\flb-exporter.exe) {
|
||||||
|
$url = ("https://storage.googleapis.com/gke-release/winnode/fluentbit-exporter/${LOGGINGEXPORTER_VERSION}/flb-exporter-${LOGGINGEXPORTER_VERSION}.exe")
|
||||||
Log-Output 'Downloading logging exporter'
|
Log-Output 'Downloading logging exporter'
|
||||||
New-Item $LOGGINGEXPORTER_ROOT -ItemType 'directory' -Force | Out-Null
|
New-Item $LOGGINGEXPORTER_ROOT -ItemType 'directory' -Force | Out-Null
|
||||||
MustDownload-File `
|
MustDownload-File `
|
||||||
-OutFile $LOGGINGEXPORTER_ROOT\flb-exporter.exe `
|
-OutFile $LOGGINGEXPORTER_ROOT\flb-exporter.exe -URLs $url
|
||||||
-URLs 'https://storage.googleapis.com/gke-release/winnode/fluentbit-exporter/${LOGGINGEXPORTER_VERSION}/flb-exporter-${LOGGINGEXPORTER_VERSION}.exe'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user