refactor file tree structure
This commit is contained in:
parent
77b01c67c9
commit
256ff37c19
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package operator
|
package controller
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package operator
|
package controller
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/client-go/pkg/api/resource"
|
"k8s.io/client-go/pkg/api/resource"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package operator
|
package controller
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package operator
|
package controller
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package operator
|
package controller
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
Loading…
Reference in New Issue