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: "Notify deployments", Long: "Notify deployments", RunE: func(cmd *cobra.Command, args []string) error { conf := &config.KdnConfig{ DryRun: viper.GetBool("dry-run"), Logger: klog.New(viper.GetString("log.level"), viper.GetString("log.server"), viper.GetString("log.output")), Endpoint: viper.GetString("endpoint"), TokenHdr: viper.GetString("token-header"), TokenVal: viper.GetString("token-value"), Filter: viper.GetString("filter"), HealthPort: viper.GetInt("healthcheck-port"), ResyncIntv: time.Duration(viper.GetInt("resync-interval")) * time.Second, } if FakeCS { conf.ClientSet = config.FakeClientSet() } err := conf.Init( viper.GetString("api-server"), viper.GetString("context"), viper.GetString("kube-config"), ) if err != nil { return fmt.Errorf("Failed to initialize the configuration: %+v", err) } run.Run(conf, notifiers.Init(notifiers.Backends)) return nil }, } )
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.