Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
set FailureActions for docker, kubelet, kubeproxy
Browse files Browse the repository at this point in the history
reset to 900s
  • Loading branch information
andyzhangx committed Oct 8, 2018
1 parent 98b0377 commit 6b10382
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions parts/k8s/kuberneteswindowssetup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,14 @@ Set-Explorer
New-ItemProperty -Path HKLM:"\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\Main" -Name "Start Page" -Type String -Value http://bing.com
}

function
Update-ServiceFailureActions()
{
sc.exe failure "kubelet" actions= restart/60000/restart/60000/restart/60000 reset= 900
sc.exe failure "kubeproxy" actions= restart/60000/restart/60000/restart/60000 reset= 900
sc.exe failure "docker" actions= restart/60000/restart/60000/restart/60000 reset= 900
}

try
{
# Set to false for debugging. This will output the start script to
Expand Down Expand Up @@ -723,6 +731,9 @@ try
Write-Log "Start preProvisioning script"
PREPROVISION_EXTENSION

Write-Log "Update service failure actions"
Update-ServiceFailureActions

Write-Log "Setup Complete, reboot computer"
Restart-Computer
}
Expand Down

0 comments on commit 6b10382

Please sign in to comment.