INNER CODE UNIT · Go

func

pingcap/tidb-operator · cmd/resource-syncer/main.go:49

func (c *Config) AddFlags(fs *pflag.FlagSet) {
	fs.StringVarP(&c.Namespace, "namespace", "n", "default", "namespace of syncer")
	fs.StringVarP(&c.BaseDir, "base-dir", "d", "", "base dir of data")
	fs.StringVar(&c.SecretDirName, "secret-dir-name", "secrets", "dir name of secret data")
	fs.StringToStringVarP(&c.Labels, "labels", "l", map[string]string{
		v1alpha1.LabelKeyManagedBy: v1alpha1.LabelValManagedByOperator,
	}, "labels of secrets")

	fs.StringVar(&c.ProbeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
}

func main() {
	opts := zap.Options{
		Development:     false,
		StacktraceLevel: zapcore.PanicLevel, // stacktrace on panic only
		// use console encoder now for development, switch to json if needed later
		Encoder: zapcore.NewConsoleEncoder(zapcore.EncoderConfig{
			TimeKey:        "T",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…