github.com/oam-dev/cluster-gateway@v1.9.0/pkg/config/args_secret.go (about)

     1  package config
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/spf13/pflag"
     7  )
     8  
     9  // SecretNamespace the namespace to search cluster credentials
    10  var SecretNamespace = "vela-system"
    11  
    12  func ValidateSecret() error {
    13  	if len(SecretNamespace) == 0 {
    14  		return fmt.Errorf("must specify --secret-namespace")
    15  	}
    16  	return nil
    17  }
    18  
    19  func AddSecretFlags(set *pflag.FlagSet) {
    20  	set.StringVarP(&SecretNamespace, "secret-namespace", "", SecretNamespace,
    21  		"the namespace to reading secrets")
    22  }