Skip to content

Commit

Permalink
Antrea retry (#41)
Browse files Browse the repository at this point in the history
* Antrea retries if kube proxy not online yet, restart final print services
  • Loading branch information
jayunit100 authored Jul 1, 2021
1 parent a22dc63 commit bb11056
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
20 changes: 16 additions & 4 deletions forked/1-antrea.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,19 @@ Get-Service *kube*
Get-Service *antrea*
Get-Service *ovs*

# Restart antrea, just in case needs to be done bc maybe kube proxy
# wasnt initially up. TODO, should we have antrea talk directly to the
# apiserver over an IP address, rather then relying on the kube-proxy SEP?
start-service *antrea*
##################################################
# Try starting antrea. Restart it, just in case #
##################################################
$antrea = Get-Service -Name "antrea-agent"
$antrea_starts = 0
while ($antrea.Status -ne 'Running')
{
Write-Output("... Trying to start antrea service... $antrea_starts")
Start-Service "antrea-agent"
$antrea_starts = $antrea_starts + 1
$antrea.Refresh()
}
Write-Output("Done starting antrea... ")
Get-Service *kube*
Get-Service *ovs*
Get-Service *antrea*
2 changes: 1 addition & 1 deletion sync/shared/kubejoin.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$env:path += ";C:\Program Files\containerd"
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
kubeadm join 10.20.30.10:6443 --cri-socket "npipe:////./pipe/containerd-containerd" --token 9n3umk.o2iqrho7rjakrqps --discovery-token-ca-cert-hash sha256:045241bfcea2c884eceef830db4dcf9432c5f0aa8d00fbe2f54710f4bc284cdb
kubeadm join 10.20.30.10:6443 --cri-socket "npipe:////./pipe/containerd-containerd" --token 86039w.99bp7lykobg831qx --discovery-token-ca-cert-hash sha256:6f4cac90bb19a1af3c620eb4bbd015d00b2181653ab6f36a3bf5ebce0dc01e76

0 comments on commit bb11056

Please sign in to comment.