Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
48848731
Unverified
Commit
48848731
authored
May 24, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
May 24, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #78272 from yujuhong/disable-windows-defender
GCE: Disable the Windows defender
parents
a07b0272
3b58a5d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
k8s-node-setup.psm1
cluster/gce/windows/k8s-node-setup.psm1
+4
-6
No files found.
cluster/gce/windows/k8s-node-setup.psm1
View file @
48848731
...
@@ -249,18 +249,16 @@ function Set-PrerequisiteOptions {
...
@@ -249,18 +249,16 @@ function Set-PrerequisiteOptions {
Install-Module -Name powershell-yaml -Force
Install-Module -Name powershell-yaml -Force
}
}
# Disables Windows Defender realtime scanning if this Windows node is part of a
# Disables Windows Defender realtime scanning.
# test cluster.
# TODO: remove this workaround once the fix is rolled out the Windows image
#
# https://github.com/kubernetes/kubernetes/issues/75148
# ${kube_env} must have already been set.
function
Disable-WindowsDefender
{
function
Disable-WindowsDefender
{
# Windows Defender periodically consumes 100% of the CPU, so disable realtime
# Windows Defender periodically consumes 100% of the CPU, so disable realtime
# scanning. Uninstalling the Windows Feature will prevent the service from
# scanning. Uninstalling the Windows Feature will prevent the service from
# starting after a reboot.
# starting after a reboot.
# TODO(pjh): move this step to image preparation, since we don't want to do a
# TODO(pjh): move this step to image preparation, since we don't want to do a
# full reboot here.
# full reboot here.
if
((
Test-IsTestCluster
${
kube_env
}
)
-and
if
((
Get-WindowsFeature
-Name
'Windows-Defender'
)
.Installed
)
{
((
Get-WindowsFeature
-Name
'Windows-Defender'
)
.Installed
))
{
Log-Output
"Disabling Windows Defender service"
Log-Output
"Disabling Windows Defender service"
Set-MpPreference
-DisableRealtimeMonitoring
$true
Set-MpPreference
-DisableRealtimeMonitoring
$true
Uninstall-WindowsFeature
-Name
'Windows-Defender'
Uninstall-WindowsFeature
-Name
'Windows-Defender'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment