node

package
v3.11.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const ManageNodeCommandName = "manage-node"

Variables

This section is empty.

Functions

func GetPodHostFieldLabel

func GetPodHostFieldLabel(apiVersion string) string

func NewCommandManageNode

func NewCommandManageNode(f kcmdutil.Factory, commandName, fullName string, streams genericclioptions.IOStreams) *cobra.Command

NewCommandManageNode implements the OpenShift cli manage-node command

func ValidOperation

func ValidOperation(c *cobra.Command) error

Types

type EvacuateOptions

type EvacuateOptions struct {
	Options *NodeOptions

	// Optional params
	DryRun      bool
	Force       bool
	GracePeriod int64
	// contains filtered or unexported fields
}

func NewEvacuateOptions

func NewEvacuateOptions(nodeOptions *NodeOptions) *EvacuateOptions

NewEvacuateOptions creates a new EvacuateOptions with default values.

func (*EvacuateOptions) AddFlags

func (e *EvacuateOptions) AddFlags(cmd *cobra.Command)

func (*EvacuateOptions) Run

func (e *EvacuateOptions) Run() error

func (*EvacuateOptions) RunEvacuate

func (e *EvacuateOptions) RunEvacuate(node *kapi.Node) error

type ListPodsOptions

type ListPodsOptions struct {
	Options *NodeOptions
	// contains filtered or unexported fields
}

func (*ListPodsOptions) AddFlags

func (l *ListPodsOptions) AddFlags(cmd *cobra.Command)

func (*ListPodsOptions) Run

func (l *ListPodsOptions) Run() error

type ManageNodeOptions

type ManageNodeOptions struct {
	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

func NewManageNodeOptions

func NewManageNodeOptions(streams genericclioptions.IOStreams) *ManageNodeOptions

func (*ManageNodeOptions) Complete

func (o *ManageNodeOptions) Complete(c *cobra.Command, f kcmdutil.Factory, args []string) error

func (*ManageNodeOptions) RunManageNode

func (o *ManageNodeOptions) RunManageNode(c *cobra.Command) error

func (*ManageNodeOptions) Validate

func (o *ManageNodeOptions) Validate(c *cobra.Command) error

type NodeOptions

type NodeOptions struct {
	DefaultNamespace   string
	ExternalKubeClient kubernetes.Interface
	KubeClient         kclientset.Interface

	Mapper  meta.RESTMapper
	Typer   runtime.ObjectTyper
	Printer func(mapping *meta.RESTMapping, withNamespace bool) (kprinters.ResourcePrinter, error)

	CmdPrinter       kprinters.ResourcePrinter
	CmdPrinterOutput bool

	Builder *resource.Builder

	NodeNames []string

	// Common optional params
	Selector    string
	PodSelector string

	genericclioptions.IOStreams
}

func NewNodeOptions

func NewNodeOptions(streams genericclioptions.IOStreams) *NodeOptions

func (*NodeOptions) Complete

func (n *NodeOptions) Complete(f kcmdutil.Factory, c *cobra.Command, args []string) error

func (*NodeOptions) GetNodes

func (n *NodeOptions) GetNodes() ([]*kapi.Node, error)

func (*NodeOptions) GetPrinters

func (n *NodeOptions) GetPrinters(gvk schema.GroupVersionKind, withNamespace bool) (kprinters.ResourcePrinter, error)

func (*NodeOptions) GetPrintersByObject

func (n *NodeOptions) GetPrintersByObject(obj runtime.Object) (kprinters.ResourcePrinter, error)

func (*NodeOptions) GetPrintersByResource

func (n *NodeOptions) GetPrintersByResource(resource schema.GroupVersionResource, withNamespace bool) (kprinters.ResourcePrinter, error)

func (*NodeOptions) Validate

func (n *NodeOptions) Validate(checkNodeSelector bool) error

type SchedulableOptions

type SchedulableOptions struct {
	Options *NodeOptions

	Schedulable bool
}

func (*SchedulableOptions) Run

func (s *SchedulableOptions) Run() error

Jump to

Keyboard shortcuts

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