func main()

in cmd/localdev/main.go [41:83]


func main() {

	klog.InitFlags(nil)
	flag.Parse()

	if project == "" {
		fmt.Println("Please supply a project id.")
		os.Exit(1)
	}
	if location == "" {
		fmt.Println("Please supply a cluster region/zone.")
		os.Exit(1)
	}
	if cluster == "" {
		fmt.Println("Please supply a cluster name.")
		os.Exit(1)
	}

	cfg := common.Config{
		ProjectID:      project,
		Location:       location,
		Cluster:        cluster,
		Mode:           common.ModeCluster,
		NodeName:       "",
		NodeIP:         "",
		Nodepool:       "",
		HostNetwork:    false,
		ReportInterval: time.Duration(1 * time.Minute),
		ConnProbes:     false,
		UserAgent:      common.UserAgent,
		MetricPrefix:   common.MetricPrefix,
	}

	klog.Infof("starting gke-prober locally with config: %+v\n", cfg)

	ctx := server.SetupSignalContext()

	defer klog.Infof("exiting...")

	s := server.NewServer(nil, nil)
	s.Config = cfg
	s.RunUntil(ctx, kubeconfig)
}