Documentation ¶
Index ¶
- Constants
- Variables
- func AddKubeConfigFlags(flags *pflag.FlagSet)
- func AddNamespaceFlag(flags *pflag.FlagSet)
- func ContainKarmadaScope(operationScope OperationScope) bool
- func ContainMembersScope(operationScope OperationScope) bool
- func NewCmdOptions(parentCommand string, out io.Writer) *cobra.Command
- func VerifyOperationScopeFlags(operationScope OperationScope, supportScope ...OperationScope) error
- type OperationScope
Constants ¶
const ( // KarmadaCertsName the secret name of karmada certs KarmadaCertsName = "karmada-cert" // CaCertAndKeyName ca certificate cert/key name in karmada certs secret CaCertAndKeyName = "ca" )
const DefaultHostClusterDomain = "cluster.local"
DefaultHostClusterDomain defines the default cluster domain of karmada host cluster.
const DefaultKarmadaClusterNamespace = "karmada-cluster"
DefaultKarmadaClusterNamespace defines the default namespace where the member cluster secrets are stored.
const DefaultKarmadactlCommandDuration = 60 * time.Second
DefaultKarmadactlCommandDuration defines the default timeout for karmadactl execute
Variables ¶
var DefaultConfigFlags = genericclioptions.NewConfigFlags(true).WithDeprecatedPasswordFlag().WithDiscoveryBurst(300).WithDiscoveryQPS(50.0)
DefaultConfigFlags It composes the set of values necessary for obtaining a REST client config with default values set.
Functions ¶
func AddKubeConfigFlags ¶ added in v1.4.0
AddKubeConfigFlags adds flags to the specified FlagSet.
func AddNamespaceFlag ¶ added in v1.11.1
AddNamespaceFlag add namespace flag to the specified FlagSet.
func ContainKarmadaScope ¶ added in v1.11.0
func ContainKarmadaScope(operationScope OperationScope) bool
ContainKarmadaScope returns true if the given operationScope contains Karmada control plane.
func ContainMembersScope ¶ added in v1.11.0
func ContainMembersScope(operationScope OperationScope) bool
ContainMembersScope returns true if the given operationScope contains member clusters.
func NewCmdOptions ¶ added in v1.3.0
NewCmdOptions implements the options command
func VerifyOperationScopeFlags ¶ added in v1.11.0
func VerifyOperationScopeFlags(operationScope OperationScope, supportScope ...OperationScope) error
VerifyOperationScopeFlags verifies whether the given operationScope is valid.
Types ¶
type OperationScope ¶ added in v1.11.0
type OperationScope string
OperationScope defines the operation scope of a command.
const ( // KarmadaControlPlane indicates the operation scope of a command is Karmada control plane. KarmadaControlPlane OperationScope = "karmada" // Members indicates the operation scope of a command is member clusters. Members OperationScope = "members" // All indicates the operation scope of a command contains Karmada control plane and member clusters. All OperationScope = "all" )
func (*OperationScope) Set ¶ added in v1.11.0
func (o *OperationScope) Set(s string) error
Set value to OperationScope
func (*OperationScope) String ¶ added in v1.11.0
func (o *OperationScope) String() string
String returns the string value of OperationScope
func (*OperationScope) Type ¶ added in v1.11.0
func (o *OperationScope) Type() string
Type returns type of OperationScope