join

package
v1.10.0-alpha.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdJoin

func NewCmdJoin(f cmdutil.Factory, parentCommand string) *cobra.Command

NewCmdJoin defines the `join` command that registers a cluster.

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

	// ClusterZone represents the zone of the cluster locate in.
	// Deprecated: Use ClusterZones instead.
	ClusterZone 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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL