refactor file tree structure
This commit is contained in:
parent
77b01c67c9
commit
256ff37c19
|
|
@ -29,11 +29,11 @@
|
|||
|
||||
### Build dependencies
|
||||
|
||||
$ go build -i -v
|
||||
$ go build -i -v cmd
|
||||
|
||||
### Run operator (outside kubernetes cluster)
|
||||
|
||||
$ go run main.go
|
||||
$ go run cmd/main.go
|
||||
|
||||
### Check if ThirdPartyResource has been registered
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ import (
|
|||
"sync"
|
||||
"syscall"
|
||||
|
||||
"github.bus.zalan.do/acid/postgres-operator/operator"
|
||||
"github.bus.zalan.do/acid/postgres-operator/pkg/controller"
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
var options operator.Options
|
||||
var options controller.Options
|
||||
|
||||
func init() {
|
||||
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
|
||||
|
||||
spiloOperator := operator.New(options)
|
||||
spiloOperator := controller.New(options)
|
||||
spiloOperator.Run(stop, wg)
|
||||
|
||||
sig := <-sigs // Wait for signals (this hangs until a signal arrives)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package operator
|
||||
package controller
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package operator
|
||||
package controller
|
||||
|
||||
import (
|
||||
"k8s.io/client-go/pkg/api/resource"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package operator
|
||||
package controller
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package operator
|
||||
package controller
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
|
@ -44,10 +44,10 @@ func New(options Options) *SpiloOperator {
|
|||
}
|
||||
|
||||
operator := &SpiloOperator{
|
||||
Options: options,
|
||||
ClientSet: clientSet,
|
||||
Client: spiloClient,
|
||||
Supervisor: newSupervisor(spiloClient, clientSet),
|
||||
Options: options,
|
||||
ClientSet: clientSet,
|
||||
Client: spiloClient,
|
||||
Supervisor: newSupervisor(spiloClient, clientSet),
|
||||
}
|
||||
|
||||
return operator
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package operator
|
||||
package controller
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
Loading…
Reference in New Issue