Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // FakeCS uses the client-go testing clientset FakeCS bool // RootCmd represents the base command when called without any subcommands RootCmd = &cobra.Command{ Use: appName, Short: "Add named ports on GCP node pools", Long: "Add named ports given by services annotations on GCP node pools", RunE: func(cmd *cobra.Command, args []string) error { conf := &config.KnpConfig{ DryRun: viper.GetBool("dry-run"), Logger: klog.New(viper.GetString("log.level"), viper.GetString("log.server"), viper.GetString("log.output")), HealthPort: viper.GetInt("healthcheck-port"), ResyncIntv: time.Duration(viper.GetInt("resync-interval")) * time.Second, Cluster: viper.GetString("cluster"), Zone: viper.GetString("zone"), Project: viper.GetString("project"), } if FakeCS { conf.ClientSet = config.FakeClientSet() } err := conf.Init(viper.GetString("api-server"), viper.GetString("kube-config")) if err != nil { return fmt.Errorf("Failed to initialize the configuration: %+v", err) } if conf.Cluster == "" { return fmt.Errorf("Cluster name must be specified") } run.Run(conf) return nil }, } )
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.