Skip to content
This repository was archived by the owner on Apr 17, 2019. It is now read-only.

Commit 4edea2c

Browse files
authored
Revert "[nginx-ingress-controller]: Avoid sync without a reachable master"
1 parent 693d76e commit 4edea2c

File tree

2 files changed

+7
-20
lines changed

2 files changed

+7
-20
lines changed

ingress/controllers/nginx/controller.go

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -420,19 +420,13 @@ func (lbc *loadBalancerController) sync(key string) error {
420420
return fmt.Errorf("deferring sync till endpoints controller has synced")
421421
}
422422

423-
// by default no custom configuration configmap
424-
cfg := &api.ConfigMap{}
425-
426-
if lbc.nxgConfigMap != "" {
427-
// Search for custom configmap (defined in main args)
428-
var err error
429-
ns, name, _ := parseNsName(lbc.nxgConfigMap)
430-
cfg, err = lbc.getConfigMap(ns, name)
431-
if err != nil {
432-
glog.V(3).Infof("unexpected error searching configmap %v: %v", lbc.nxgConfigMap, err)
433-
lbc.syncQueue.requeue(key, err)
434-
return
435-
}
423+
var cfg *api.ConfigMap
424+
425+
ns, name, _ := parseNsName(lbc.nxgConfigMap)
426+
cfg, err := lbc.getConfigMap(ns, name)
427+
if err != nil {
428+
glog.V(3).Infof("unexpected error searching configmap %v: %v", lbc.nxgConfigMap, err)
429+
cfg = &api.ConfigMap{}
436430
}
437431

438432
ngxConfig := lbc.nginx.ReadConfig(cfg)

ingress/controllers/nginx/main.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,6 @@ func main() {
130130
}
131131
glog.Infof("Validated %v as the default backend", *defaultSvc)
132132

133-
if *nxgConfigMap != "" {
134-
_, _, err := parseNsName(*nxgConfigMap)
135-
if err != nil {
136-
glog.Fatalf("configmap error: %v", err)
137-
}
138-
}
139-
140133
lbc, err := newLoadBalancerController(kubeClient, *resyncPeriod, *defaultSvc, *watchNamespace, *nxgConfigMap, *tcpConfigMapName, *udpConfigMapName, runtimePodInfo)
141134
if err != nil {
142135
glog.Fatalf("%v", err)

0 commit comments

Comments
 (0)