@@ -11,7 +11,7 @@ import (
11
11
"github.com/appscode/kutil/discovery"
12
12
"github.com/appscode/pat"
13
13
api "github.com/appscode/stash/apis/stash"
14
- cs "github.com/appscode/stash/client/typed/stash/v1alpha1 "
14
+ cs "github.com/appscode/stash/client"
15
15
"github.com/appscode/stash/pkg/controller"
16
16
"github.com/appscode/stash/pkg/docker"
17
17
"github.com/prometheus/client_golang/prometheus/promhttp"
@@ -25,12 +25,13 @@ func NewCmdRun() *cobra.Command {
25
25
var (
26
26
masterURL string
27
27
kubeconfigPath string
28
- address string = ":56790"
29
- opts = controller.Options {
28
+ address = ":56790"
29
+ opts = controller.Options {
30
30
DockerRegistry : docker .ACRegistry ,
31
31
StashImageTag : stringz .Val (v .Version .Version , "canary" ),
32
- ResyncPeriod : 5 * time .Minute ,
32
+ ResyncPeriod : 10 * time .Minute ,
33
33
MaxNumRequeues : 5 ,
34
+ NumThreads : 2 ,
34
35
}
35
36
scratchDir = "/tmp"
36
37
)
@@ -64,7 +65,7 @@ func NewCmdRun() *cobra.Command {
64
65
// Now let's start the controller
65
66
stop := make (chan struct {})
66
67
defer close (stop )
67
- go ctrl .Run (1 , stop )
68
+ go ctrl .Run (stop )
68
69
69
70
m := pat .New ()
70
71
m .Get ("/metrics" , promhttp .Handler ())
@@ -73,7 +74,7 @@ func NewCmdRun() *cobra.Command {
73
74
log .Infof ("URL pattern: %s" , pattern )
74
75
exporter := & PrometheusExporter {
75
76
kubeClient : kubeClient ,
76
- stashClient : stashClient ,
77
+ stashClient : stashClient . StashV1alpha1 () ,
77
78
scratchDir : scratchDir ,
78
79
}
79
80
m .Get (pattern , exporter )
0 commit comments