mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Leave Windows Defender enabled for clusters on GCE
This commit is contained in:
parent
66b0a0c17d
commit
3ac5c1565a
@ -100,7 +100,6 @@ try {
|
||||
Dump-DebugInfoToConsole
|
||||
Set-PrerequisiteOptions
|
||||
$kube_env = Fetch-KubeEnv
|
||||
Disable-WindowsDefender
|
||||
|
||||
if (Test-IsTestCluster $kube_env) {
|
||||
Log-Output 'Test cluster detected, installing OpenSSH.'
|
||||
|
@ -244,22 +244,6 @@ function Set-PrerequisiteOptions {
|
||||
Install-Module -Name powershell-yaml -Force
|
||||
}
|
||||
|
||||
# Disables Windows Defender realtime scanning.
|
||||
# TODO: remove this workaround once the fix is rolled out the Windows image
|
||||
# https://github.com/kubernetes/kubernetes/issues/75148
|
||||
function Disable-WindowsDefender {
|
||||
# Windows Defender periodically consumes 100% of the CPU, so disable realtime
|
||||
# scanning. Uninstalling the Windows Feature will prevent the service from
|
||||
# starting after a reboot.
|
||||
# TODO(pjh): move this step to image preparation, since we don't want to do a
|
||||
# full reboot here.
|
||||
if ((Get-WindowsFeature -Name 'Windows-Defender').Installed) {
|
||||
Log-Output "Disabling Windows Defender service"
|
||||
Set-MpPreference -DisableRealtimeMonitoring $true
|
||||
Uninstall-WindowsFeature -Name 'Windows-Defender'
|
||||
}
|
||||
}
|
||||
|
||||
# Creates directories where other functions in this module will read and write
|
||||
# data.
|
||||
# Note: C:\tmp is required for running certain kubernetes tests.
|
||||
|
Loading…
Reference in New Issue
Block a user