Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DesiredCordon a flag indicate karmadactl.RunCordonOrUncordon cordon a cluster, // cordon prevent new resource scheduler to cordoned cluster. DesiredCordon = iota // DesiredUnCordon a flag indicate karmadactl.RunCordonOrUncordon uncordon a cluster. DesiredUnCordon )
Variables ¶
This section is empty.
Functions ¶
func NewCmdCordon ¶
NewCmdCordon defines the `cordon` command that mark cluster as unschedulable.
func NewCmdUncordon ¶
NewCmdUncordon defines the `uncordon` command that mark cluster as schedulable.
func RunCordonOrUncordon ¶
func RunCordonOrUncordon(desired int, f util.Factory, opts CommandCordonOption) error
RunCordonOrUncordon exec marks the cluster unschedulable or schedulable according to desired. if true cordon cluster otherwise uncordon cluster.
Types ¶
type CommandCordonOption ¶
type CommandCordonOption struct { // ClusterName is the cluster's name that we are going to join with. ClusterName string // DryRun tells if run the command in dry-run mode, without making any server requests. DryRun bool }
CommandCordonOption holds all command options for cordon and uncordon
func (*CommandCordonOption) Complete ¶
func (o *CommandCordonOption) Complete(args []string) error
Complete ensures that options are valid and marshals them if necessary.
Click to show internal directories.
Click to hide internal directories.