Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Restart all kube-system pods in GKE #11136

Merged
merged 1 commit into from Apr 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions test/k8sT/assertionHelpers.go
Expand Up @@ -120,6 +120,11 @@ func DeployCiliumOptionsAndDNS(vm *helpers.Kubectl, ciliumFilename string, optio
By(fmt.Sprintf("%s (hint: %s)",
"Assuming that microk8s already has DNS deployed...",
"Use 'microk8s.enable dns' to create deployment"))
case helpers.CIIntegrationGKE:
By("Restarting all kube-system pods")
if res := vm.DeleteResource("pod", fmt.Sprintf("-n %s --all", helpers.KubeSystemNamespace)); !res.WasSuccessful() {
log.Warningf("Unable to delete kube-system pods: %s", res.OutputPrettyPrint())
}
default:
vm.ApplyDefault(helpers.DNSDeployment(vm.BasePath()))
By("Restarting DNS Pods")
Expand All @@ -138,6 +143,12 @@ func DeployCiliumOptionsAndDNS(vm *helpers.Kubectl, ciliumFilename string, optio
ExpectCiliumReady(vm)
ExpectCiliumOperatorReady(vm)
ExpectKubeDNSReady(vm)

switch helpers.GetCurrentIntegration() {
case helpers.CIIntegrationGKE:
err := vm.WaitforPods(helpers.KubeSystemNamespace, "", longTimeout)
ExpectWithOffset(1, err).Should(BeNil(), "kube-system pods were not able to get into ready state after restart")
}
}

// SkipIfBenchmark will skip the test if benchmark is not specified
Expand Down