Update ingress controller, and fix integration test
parent
1fc0b9b9d4
commit
797925f183
|
@ -77,7 +77,7 @@ spec:
|
|||
spec:
|
||||
terminationGracePeriodSeconds: 60
|
||||
containers:
|
||||
- image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.9.0-beta.17
|
||||
- image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.9.0
|
||||
name: nginx-ingress-controller
|
||||
imagePullPolicy: IfNotPresent
|
||||
readinessProbe:
|
||||
|
|
|
@ -170,6 +170,11 @@ var LocalkubeCachedImages = []string{
|
|||
// Dashboard
|
||||
"gcr.io/google_containers/kubernetes-dashboard-amd64:v1.6.3",
|
||||
|
||||
// Ingress Controller
|
||||
"nginx:alpine",
|
||||
"gcr.io/google_containers/defaultbackend:1.4",
|
||||
"quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.9.0",
|
||||
|
||||
// DNS
|
||||
"gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.5",
|
||||
"gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.5",
|
||||
|
@ -190,6 +195,11 @@ func GetKubeadmCachedImages(version string) []string {
|
|||
// Dashboard
|
||||
"gcr.io/google_containers/kubernetes-dashboard-amd64:v1.6.3",
|
||||
|
||||
// Ingress Controller
|
||||
"nginx:alpine",
|
||||
"gcr.io/google_containers/defaultbackend:1.4",
|
||||
"quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.9.0",
|
||||
|
||||
// Addon Manager
|
||||
"gcr.io/google-containers/kube-addon-manager:v6.4-beta.2",
|
||||
|
||||
|
|
|
@ -97,11 +97,18 @@ func testIngressController(t *testing.T) {
|
|||
t.Fatalf("waiting for nginx to be up: %s", err)
|
||||
}
|
||||
|
||||
expectedStr := "Welcome to nginx!"
|
||||
runCmd := fmt.Sprintf("curl http://127.0.0.1:80 -H 'Host: nginx.example.com'")
|
||||
sshCmdOutput, _ := minikubeRunner.SSH(runCmd)
|
||||
if !strings.Contains(sshCmdOutput, expectedStr) {
|
||||
t.Fatalf("ExpectedStr sshCmdOutput to be: %s. Output was: %s", expectedStr, sshCmdOutput)
|
||||
checkIngress := func() error {
|
||||
expectedStr := "Welcome to nginx!"
|
||||
runCmd := fmt.Sprintf("curl http://127.0.0.1:80 -H 'Host: nginx.example.com'")
|
||||
sshCmdOutput, _ := minikubeRunner.SSH(runCmd)
|
||||
if !strings.Contains(sshCmdOutput, expectedStr) {
|
||||
return fmt.Errorf("ExpectedStr sshCmdOutput to be: %s. Output was: %s", expectedStr, sshCmdOutput)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := util.Retry(t, checkIngress, 3*time.Second, 5); err != nil {
|
||||
t.Fatalf(err.Error())
|
||||
}
|
||||
|
||||
defer kubectlRunner.RunCommand([]string{"delete", "-f", podPath})
|
||||
|
|
Loading…
Reference in New Issue