INNER CODE UNIT · Go

operatorMain

k8up-io/k8up · cmd/operator/main.go:98

func operatorMain(c *cli.Context) error {
	operatorLog := cmd.AppLogger(c).WithName("operator")
	operatorLog.Info("initializing")
	ctrl.SetLogger(operatorLog)

	cfg.Config.BackupCommandRestic = cmd.SplitAtComma(c.StringSlice(argCommandRestic))
	cfg.Config.ResticOptions = strings.Join(cmd.SplitAtComma(c.StringSlice(argResticOptions)), ",")

	err := validateQuantityFlags(c)
	if err != nil {
		return err
	}

	mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
		Scheme: k8upScheme(),
		// MetricsBindAddress: cfg.Config.MetricsBindAddress,
		// Port:               9443,
		LeaderElection:   cfg.Config.EnableLeaderElection,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…