mirror of https://github.com/k3s-io/k3s
Dump Windows version information during cluster bringup.
parent
43556be50e
commit
18a2a98d67
|
@ -91,6 +91,7 @@ try {
|
|||
# then put these calls into a loop over a list of XYZ-psm1 keys.
|
||||
FetchAndImport-ModuleFromMetadata 'k8s-node-setup-psm1' 'k8s-node-setup.psm1'
|
||||
|
||||
Dump-DebugInfoToConsole
|
||||
Set-PrerequisiteOptions
|
||||
$kube_env = Fetch-KubeEnv
|
||||
Disable-WindowsDefender
|
||||
|
|
|
@ -128,6 +128,19 @@ function Add_GceMetadataServerRoute {
|
|||
}
|
||||
}
|
||||
|
||||
# Writes debugging information, such as Windows version and patch info, to the
|
||||
# console.
|
||||
function Dump-DebugInfoToConsole {
|
||||
Try {
|
||||
$version = "$([System.Environment]::OSVersion.Version | Out-String)"
|
||||
$hotfixes = "$(Get-Hotfix | Out-String)"
|
||||
$image = "$(Get-InstanceMetadata 'image' | Out-String)"
|
||||
Log-Output "Windows version:`n$version"
|
||||
Log-Output "Installed hotfixes:`n$hotfixes"
|
||||
Log-Output "GCE Windows image:`n$image"
|
||||
} Catch { }
|
||||
}
|
||||
|
||||
# Fetches the kube-env from the instance metadata.
|
||||
#
|
||||
# Returns: a PowerShell Hashtable object containing the key-value pairs from
|
||||
|
|
Loading…
Reference in New Issue