Skip to content

Commit

Permalink
More refactoring, mainly tidy up of controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Kelly committed Sep 5, 2018
1 parent 3a8b9fd commit 5e66437
Show file tree
Hide file tree
Showing 6 changed files with 346 additions and 312 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Session.vim
# Ingress Controller binaries
osx-nginx-ingress
nginx-ingress
!nginx-ingress/
osx-nginx-plus-ingress
nginx-plus-ingress
cmd/nginx-ic/nginx-ic
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ TAG = $(VERSION)
PREFIX = nginx/nginx-ingress

DOCKER_RUN = docker run --rm -v $(shell pwd):/go/src/github.com/nginxinc/kubernetes-ingress
DOCKER_BUILD_RUN = docker run --rm -v $(shell pwd):/go/src/github.com/nginxinc/kubernetes-ingress -w /go/src/github.com/nginxinc/kubernetes-ingress/cmd/nginx-ic/
DOCKER_BUILD_RUN = docker run --rm -v $(shell pwd):/go/src/github.com/nginxinc/kubernetes-ingress -w /go/src/github.com/nginxinc/kubernetes-ingress/cmd/nginx-ingress/
GOLANG_CONTAINER = golang:1.10
DOCKERFILEPATH = build
DOCKERFILE = Dockerfile
Expand Down
26 changes: 13 additions & 13 deletions cmd/nginx-ic/main.go → cmd/nginx-ingress/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,19 @@ func main() {
controllerNamespace := os.Getenv("POD_NAMESPACE")

lbcInput := controller.NewLoadBalancerControllerInput{
KubeClient: kubeClient,
ResyncPeriod: 30 * time.Second,
Namespace: *watchNamespace,
CNF: cnf,
NginxConfigMaps: *nginxConfigMaps,
DefaultServerSecret: *defaultServerSecret,
NginxPlus: *nginxPlus,
IngressClass: *ingressClass,
UseIngressClassOnly: *useIngressClassOnly,
ExternalServiceName: *externalService,
ControllerNamespace: controllerNamespace,
ReportIngressStatus: *reportIngressStatus,
LeaderElectionEnabled: *leaderElectionEnabled,
KubeClient: kubeClient,
ResyncPeriod: 30 * time.Second,
Namespace: *watchNamespace,
NginxConfigurator: cnf,
NginxConfigMaps: *nginxConfigMaps,
DefaultServerSecret: *defaultServerSecret,
IsNginxPlus: *nginxPlus,
IngressClass: *ingressClass,
UseIngressClassOnly: *useIngressClassOnly,
ExternalServiceName: *externalService,
ControllerNamespace: controllerNamespace,
ReportIngressStatus: *reportIngressStatus,
IsLeaderElectionEnabled: *leaderElectionEnabled,
}
lbc := controller.NewLoadBalancerController(lbcInput)
go handleTermination(lbc, ngxc, nginxDone)
Expand Down
Loading

0 comments on commit 5e66437

Please sign in to comment.