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

Update ingress controller, and fix integration test #2292

Merged
merged 2 commits into from
Dec 13, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy/addons/ingress/ingress-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions pkg/minikube/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ var LocalkubeCachedImages = []string{
// Dashboard
"gcr.io/google_containers/kubernetes-dashboard-amd64:v1.6.3",

// Ingress Controller
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These images get cached on all systems - I don't think we want to add them here.

@r2d4 where do you think we should add these? Maybe in common.sh using the minikube cache command in a list?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @r2d4 Could you please help to check this?

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

Expand Down
17 changes: 12 additions & 5 deletions test/integration/addons_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down