Skip to content

Commit 5e64941

Browse files
authored
Merge pull request kubernetes#81625 from pjh/reenable-windows-defender
Leave Windows Defender enabled for clusters on GCE
2 parents cda2291 + 3ac5c15 commit 5e64941

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

cluster/gce/windows/configure.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ try {
100100
Dump-DebugInfoToConsole
101101
Set-PrerequisiteOptions
102102
$kube_env = Fetch-KubeEnv
103-
Disable-WindowsDefender
104103

105104
if (Test-IsTestCluster $kube_env) {
106105
Log-Output 'Test cluster detected, installing OpenSSH.'

cluster/gce/windows/k8s-node-setup.psm1

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -244,22 +244,6 @@ function Set-PrerequisiteOptions {
244244
Install-Module -Name powershell-yaml -Force
245245
}
246246

247-
# Disables Windows Defender realtime scanning.
248-
# TODO: remove this workaround once the fix is rolled out the Windows image
249-
# https://github.com/kubernetes/kubernetes/issues/75148
250-
function Disable-WindowsDefender {
251-
# Windows Defender periodically consumes 100% of the CPU, so disable realtime
252-
# scanning. Uninstalling the Windows Feature will prevent the service from
253-
# starting after a reboot.
254-
# TODO(pjh): move this step to image preparation, since we don't want to do a
255-
# full reboot here.
256-
if ((Get-WindowsFeature -Name 'Windows-Defender').Installed) {
257-
Log-Output "Disabling Windows Defender service"
258-
Set-MpPreference -DisableRealtimeMonitoring $true
259-
Uninstall-WindowsFeature -Name 'Windows-Defender'
260-
}
261-
}
262-
263247
# Creates directories where other functions in this module will read and write
264248
# data.
265249
# Note: C:\tmp is required for running certain kubernetes tests.

0 commit comments

Comments
 (0)