Update ingress controller, and fix integration test

pull/2313/head
kairen 2017-12-10 02:19:50 +08:00 committed by dlorenc
parent 1fc0b9b9d4
commit 797925f183
3 changed files with 23 additions and 6 deletions

View File

@ -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:

View File

@ -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",

View File

@ -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})