Skip to content

Commit

Permalink
Merge pull request #4786 from reegnz/remove-nginx-ingress-default-bac…
Browse files Browse the repository at this point in the history
…kend

Remove ingress-nginx default backend.
  • Loading branch information
medyagh authored Jul 30, 2019
2 parents 5add11b + d1436b4 commit 9916d7a
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 111 deletions.
46 changes: 0 additions & 46 deletions deploy/addons/ingress/ingress-dp.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
33 changes: 0 additions & 33 deletions deploy/addons/ingress/ingress-svc.yaml.tmpl

This file was deleted.

6 changes: 0 additions & 6 deletions pkg/minikube/assets/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 0 additions & 4 deletions test/integration/addons_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
22 changes: 0 additions & 22 deletions test/integration/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9916d7a

Please sign in to comment.