unjoin

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdUnjoin

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

NewCmdUnjoin defines the `unjoin` command that removes registration of a cluster from control plane.

Types

type CommandUnjoinOption

type CommandUnjoinOption struct {
	// ClusterNamespace holds namespace where the member cluster secrets are stored
	ClusterNamespace string

	// ClusterName is the cluster's name that we are going to unjoin with.
	ClusterName string

	// ClusterContext is the cluster's context that we are going to unjoin with.
	ClusterContext string

	// ClusterKubeConfig is the cluster's kubeconfig path.
	ClusterKubeConfig string

	// DryRun tells if run the command in dry-run mode, without making any server requests.
	DryRun bool

	// Wait tells maximum command execution time
	Wait time.Duration
	// contains filtered or unexported fields
}

CommandUnjoinOption holds all command options.

func (*CommandUnjoinOption) AddFlags

func (j *CommandUnjoinOption) AddFlags(flags *pflag.FlagSet)

AddFlags adds flags to the specified FlagSet.

func (*CommandUnjoinOption) Complete

func (j *CommandUnjoinOption) Complete(args []string) error

Complete ensures that options are valid and marshals them if necessary.

func (*CommandUnjoinOption) Run

Run is the implementation of the 'unjoin' command.

func (*CommandUnjoinOption) RunUnJoinCluster

func (j *CommandUnjoinOption) RunUnJoinCluster(controlPlaneRestConfig, clusterConfig *rest.Config) error

RunUnJoinCluster unJoin the cluster from karmada.

func (*CommandUnjoinOption) Validate

func (j *CommandUnjoinOption) Validate(args []string) error

Validate ensures that command unjoin options are valid.

Jump to

Keyboard shortcuts

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