Update nginx controller for Godeps

This commit is contained in:
Prashanth Balasubramanian 2016-04-21 10:55:42 -07:00
parent 198a319fd6
commit 17b106133b
2 changed files with 5 additions and 5 deletions

View file

@ -26,7 +26,7 @@ import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/extensions"
client "k8s.io/kubernetes/pkg/client/unversioned" client "k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/util" "k8s.io/kubernetes/pkg/util/flowcontrol"
) )
const ( const (
@ -69,7 +69,7 @@ func main() {
ingClient = kubeClient.Extensions().Ingress(api.NamespaceAll) ingClient = kubeClient.Extensions().Ingress(api.NamespaceAll)
} }
tmpl, _ := template.New("nginx").Parse(nginxConf) tmpl, _ := template.New("nginx").Parse(nginxConf)
rateLimiter := util.NewTokenBucketRateLimiter(0.1, 1) rateLimiter := flowcontrol.NewTokenBucketRateLimiter(0.1, 1)
known := &extensions.IngressList{} known := &extensions.IngressList{}
// Controller loop // Controller loop

View file

@ -32,7 +32,7 @@ import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
client "k8s.io/kubernetes/pkg/client/unversioned" client "k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/util" "k8s.io/kubernetes/pkg/util/flowcontrol"
) )
const ( const (
@ -227,7 +227,7 @@ type Manager struct {
sslDHParam string sslDHParam string
reloadRateLimiter util.RateLimiter reloadRateLimiter flowcontrol.RateLimiter
// template loaded ready to be used to generate the nginx configuration file // template loaded ready to be used to generate the nginx configuration file
template *template.Template template *template.Template
@ -280,7 +280,7 @@ func NewManager(kubeClient *client.Client) *Manager {
defCfg: newDefaultNginxCfg(), defCfg: newDefaultNginxCfg(),
defResolver: strings.Join(getDNSServers(), " "), defResolver: strings.Join(getDNSServers(), " "),
reloadLock: &sync.Mutex{}, reloadLock: &sync.Mutex{},
reloadRateLimiter: util.NewTokenBucketRateLimiter(0.1, 1), reloadRateLimiter: flowcontrol.NewTokenBucketRateLimiter(0.1, 1),
} }
ngx.createCertsDir(sslDirectory) ngx.createCertsDir(sslDirectory)