File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,10 @@ import (
12
12
"github.com/appscode/stash/pkg/analytics"
13
13
"github.com/appscode/stash/pkg/controller"
14
14
"github.com/appscode/stash/pkg/docker"
15
+ "github.com/appscode/stash/pkg/migrator"
15
16
"github.com/prometheus/client_golang/prometheus/promhttp"
16
17
"github.com/spf13/cobra"
18
+ apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
17
19
clientset "k8s.io/client-go/kubernetes"
18
20
"k8s.io/client-go/tools/clientcmd"
19
21
)
@@ -57,13 +59,18 @@ func NewCmdRun(version string) *cobra.Command {
57
59
}
58
60
kubeClient = clientset .NewForConfigOrDie (config )
59
61
stashClient = scs .NewForConfigOrDie (config )
62
+ crdClient := apiextensionsclient .NewForConfigOrDie (config )
60
63
61
- ctrl := controller .New (kubeClient , stashClient , tag )
64
+ ctrl := controller .New (kubeClient , crdClient , stashClient , tag )
62
65
err = ctrl .Setup ()
63
66
if err != nil {
64
67
log .Fatalln (err )
65
68
}
66
69
70
+ if err = migrator .NewMigrator (kubeClient , crdClient ).RunMigration (); err != nil {
71
+ log .Fatalln (err )
72
+ }
73
+
67
74
log .Infoln ("Starting operator..." )
68
75
ctrl .Run ()
69
76
You can’t perform that action at this time.
0 commit comments