From d1436b40fe1d869d76d6f9293d7268c7150cefe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Reegn?= Date: Wed, 17 Jul 2019 16:34:49 +0200 Subject: [PATCH] Remove ingress-nginx default backend It's not needed since nginx 0.20.0. See the following pull-requests for context: * https://github.com/kubernetes/ingress-nginx/pull/3126 * https://github.com/kubernetes/ingress-nginx/pull/3156 --- deploy/addons/ingress/ingress-dp.yaml.tmpl | 46 --------------------- deploy/addons/ingress/ingress-svc.yaml.tmpl | 33 --------------- pkg/minikube/assets/addons.go | 6 --- test/integration/addons_test.go | 4 -- test/integration/util/util.go | 22 ---------- 5 files changed, 111 deletions(-) delete mode 100644 deploy/addons/ingress/ingress-svc.yaml.tmpl diff --git a/deploy/addons/ingress/ingress-dp.yaml.tmpl b/deploy/addons/ingress/ingress-dp.yaml.tmpl index 8ee21d80c..46806633a 100644 --- a/deploy/addons/ingress/ingress-dp.yaml.tmpl +++ b/deploy/addons/ingress/ingress-dp.yaml.tmpl @@ -12,51 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: default-http-backend - namespace: kube-system - labels: - app.kubernetes.io/name: default-http-backend - app.kubernetes.io/part-of: kube-system - addonmanager.kubernetes.io/mode: Reconcile -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: default-http-backend - addonmanager.kubernetes.io/mode: Reconcile - template: - metadata: - labels: - app.kubernetes.io/name: default-http-backend - addonmanager.kubernetes.io/mode: Reconcile - spec: - terminationGracePeriodSeconds: 60 - containers: - - name: default-http-backend - # Any image is permissible as long as: - # 1. It serves a 404 page at / - # 2. It serves 200 on a /healthz endpoint - image: {{default "gcr.io/google_containers" .ImageRepository}}/defaultbackend{{.ExoticArch}}:1.4 - imagePullPolicy: IfNotPresent - livenessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 5 - ports: - - containerPort: 8080 - resources: - limits: - cpu: 20m - memory: 30Mi - requests: - cpu: 20m - memory: 30Mi --- apiVersion: extensions/v1beta1 kind: Deployment @@ -121,7 +76,6 @@ spec: hostPort: 18080 args: - /nginx-ingress-controller - - --default-backend-service=$(POD_NAMESPACE)/default-http-backend - --configmap=$(POD_NAMESPACE)/nginx-load-balancer-conf - --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services - --udp-services-configmap=$(POD_NAMESPACE)/udp-services diff --git a/deploy/addons/ingress/ingress-svc.yaml.tmpl b/deploy/addons/ingress/ingress-svc.yaml.tmpl deleted file mode 100644 index f480bbfed..000000000 --- a/deploy/addons/ingress/ingress-svc.yaml.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -kind: Service -metadata: - name: default-http-backend - namespace: kube-system - labels: - app.kubernetes.io/name: default-http-backend - app.kubernetes.io/part-of: kube-system - kubernetes.io/minikube-addons: ingress - kubernetes.io/minikube-addons-endpoint: ingress - addonmanager.kubernetes.io/mode: Reconcile -spec: - type: NodePort - ports: - - port: 80 - targetPort: 8080 - nodePort: 30001 - selector: - app.kubernetes.io/name: default-http-backend \ No newline at end of file diff --git a/pkg/minikube/assets/addons.go b/pkg/minikube/assets/addons.go index 75c462bec..969d5e30d 100644 --- a/pkg/minikube/assets/addons.go +++ b/pkg/minikube/assets/addons.go @@ -220,12 +220,6 @@ var Addons = map[string]*Addon{ "ingress-dp.yaml", "0640", true), - MustBinAsset( - "deploy/addons/ingress/ingress-svc.yaml.tmpl", - constants.AddonsPath, - "ingress-svc.yaml", - "0640", - false), }, false, "ingress"), "metrics-server": NewAddon([]*BinAsset{ MustBinAsset( diff --git a/test/integration/addons_test.go b/test/integration/addons_test.go index d6ce47b48..676c1b99a 100644 --- a/test/integration/addons_test.go +++ b/test/integration/addons_test.go @@ -129,10 +129,6 @@ func testIngressController(t *testing.T) { t.Fatalf("waiting for ingress-controller to be up: %v", err) } - if err := util.WaitForIngressDefaultBackendRunning(t); err != nil { - t.Fatalf("waiting for default-http-backend to be up: %v", err) - } - curdir, err := filepath.Abs("") if err != nil { t.Errorf("Error getting the file path for current directory: %s", curdir) diff --git a/test/integration/util/util.go b/test/integration/util/util.go index 4ab691e61..34d573162 100644 --- a/test/integration/util/util.go +++ b/test/integration/util/util.go @@ -359,28 +359,6 @@ func WaitForIngressControllerRunning(t *testing.T) error { return nil } -// WaitForIngressDefaultBackendRunning waits until ingress default backend pod to be running -func WaitForIngressDefaultBackendRunning(t *testing.T) error { - client, err := commonutil.GetClient() - if err != nil { - return errors.Wrap(err, "getting kubernetes client") - } - - if err := commonutil.WaitForDeploymentToStabilize(client, "kube-system", "default-http-backend", time.Minute*10); err != nil { - return errors.Wrap(err, "waiting for default-http-backend deployment to stabilize") - } - - if err := commonutil.WaitForService(client, "kube-system", "default-http-backend", true, time.Millisecond*500, time.Minute*10); err != nil { - return errors.Wrap(err, "waiting for default-http-backend service to be up") - } - - if err := commonutil.WaitForServiceEndpointsNum(client, "kube-system", "default-http-backend", 1, time.Second*3, time.Minute*10); err != nil { - return errors.Wrap(err, "waiting for one default-http-backend endpoint to be up") - } - - return nil -} - // WaitForGvisorControllerRunning waits for the gvisor controller pod to be running func WaitForGvisorControllerRunning(t *testing.T) error { client, err := commonutil.GetClient() -- GitLab