refactor file tree structure

This commit is contained in:
Murat Kabilov 2017-01-23 16:04:16 +01:00
parent 77b01c67c9
commit 256ff37c19
7 changed files with 14 additions and 14 deletions

View File

@ -29,11 +29,11 @@
### Build dependencies ### Build dependencies
$ go build -i -v $ go build -i -v cmd
### Run operator (outside kubernetes cluster) ### Run operator (outside kubernetes cluster)
$ go run main.go $ go run cmd/main.go
### Check if ThirdPartyResource has been registered ### Check if ThirdPartyResource has been registered

View File

@ -8,11 +8,11 @@ import (
"sync" "sync"
"syscall" "syscall"
"github.bus.zalan.do/acid/postgres-operator/operator" "github.bus.zalan.do/acid/postgres-operator/pkg/controller"
"github.com/spf13/pflag" "github.com/spf13/pflag"
) )
var options operator.Options var options controller.Options
func init() { func init() {
pflag.StringVar(&options.KubeConfig, "kubeconfig", "", "Path to kubeconfig file with authorization and master location information.") pflag.StringVar(&options.KubeConfig, "kubeconfig", "", "Path to kubeconfig file with authorization and master location information.")
@ -31,7 +31,7 @@ func main() {
wg := &sync.WaitGroup{} // Goroutines can add themselves to this to be waited on wg := &sync.WaitGroup{} // Goroutines can add themselves to this to be waited on
spiloOperator := operator.New(options) spiloOperator := controller.New(options)
spiloOperator.Run(stop, wg) spiloOperator.Run(stop, wg)
sig := <-sigs // Wait for signals (this hangs until a signal arrives) sig := <-sigs // Wait for signals (this hangs until a signal arrives)

View File

@ -1,4 +1,4 @@
package operator package controller
import ( import (
"fmt" "fmt"

View File

@ -1,4 +1,4 @@
package operator package controller
import ( import (
"k8s.io/client-go/pkg/api/resource" "k8s.io/client-go/pkg/api/resource"

View File

@ -1,4 +1,4 @@
package operator package controller
import ( import (
"fmt" "fmt"

View File

@ -1,4 +1,4 @@
package operator package controller
import ( import (
"encoding/json" "encoding/json"

View File

@ -1,4 +1,4 @@
package operator package controller
import ( import (
"fmt" "fmt"