1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/main.go
2019-02-12 16:57:36 +02:00

33 lines
745 B
Go

package main
import (
"runtime"
"flag"
"fmt"
controller "nirmata/kube-policy/controller"
)
var (
masterURL string
kubeconfig string
)
func main() {
flag.Parse()
controller, err := controller.NewController(masterURL, kubeconfig)
if err != nil {
fmt.Println("Error running Controller!")
}
err = controller.Run(runtime.NumCPU())
if err != nil {
fmt.Println("Error running Controller!")
}
}
func init() {
flag.StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
flag.StringVar(&masterURL, "master", "", "The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.")
}