Documentation
¶
Index ¶
- func NewCmdJoin(f cmdutil.Factory, parentCommand string) *cobra.Command
- type CommandJoinOption
- func (j *CommandJoinOption) AddFlags(flags *pflag.FlagSet)
- func (j *CommandJoinOption) Complete(args []string) error
- func (j *CommandJoinOption) Run(f cmdutil.Factory) error
- func (j *CommandJoinOption) RunJoinCluster(controlPlaneRestConfig, clusterConfig *rest.Config) (err error)
- func (j *CommandJoinOption) Validate(args []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommandJoinOption ¶
type CommandJoinOption struct { // ClusterNamespace holds the namespace name where the member cluster secrets are stored. ClusterNamespace string // ClusterName is the cluster's name that we are going to join with. ClusterName string // ClusterContext is the cluster's context that we are going to join with. ClusterContext string // ClusterKubeConfig is the cluster's kubeconfig path. ClusterKubeConfig string // ClusterProvider is the cluster's provider. ClusterProvider string // ClusterRegion represents the region of the cluster locate in. ClusterRegion string // ClusterZones represents the failure zones(also called availability zones) of the // member cluster. The zones are presented as a slice to support the case // that cluster runs across multiple failure zones. // Refer https://kubernetes.io/docs/setup/best-practices/multiple-zones/ for // more details about running Kubernetes in multiple zones. ClusterZones []string // DryRun tells if run the command in dry-run mode, without making any server requests. DryRun bool }
CommandJoinOption holds all command options.
func (*CommandJoinOption) AddFlags ¶
func (j *CommandJoinOption) AddFlags(flags *pflag.FlagSet)
AddFlags adds flags to the specified FlagSet.
func (*CommandJoinOption) Complete ¶
func (j *CommandJoinOption) Complete(args []string) error
Complete ensures that options are valid and marshals them if necessary.
func (*CommandJoinOption) Run ¶
func (j *CommandJoinOption) Run(f cmdutil.Factory) error
Run is the implementation of the 'join' command.
func (*CommandJoinOption) RunJoinCluster ¶
func (j *CommandJoinOption) RunJoinCluster(controlPlaneRestConfig, clusterConfig *rest.Config) (err error)
RunJoinCluster join the cluster into karmada.
func (*CommandJoinOption) Validate ¶
func (j *CommandJoinOption) Validate(args []string) error
Validate checks option and return a slice of found errs.
Click to show internal directories.
Click to hide internal directories.