node

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2015 License: Apache-2.0 Imports: 19 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 *clientcmd.Factory, commandName, fullName string, out io.Writer) *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
}

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
}

func (*ListPodsOptions) AddFlags

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

func (*ListPodsOptions) Run

func (l *ListPodsOptions) Run() error

func (*ListPodsOptions) RunListPods

func (l *ListPodsOptions) RunListPods(node *kapi.Node) error

type NodeOptions

type NodeOptions struct {
	DefaultNamespace string
	Kclient          *client.Client
	Writer           io.Writer

	Mapper            meta.RESTMapper
	Typer             runtime.ObjectTyper
	RESTClientFactory func(mapping *meta.RESTMapping) (resource.RESTClient, error)
	Printer           func(mapping *meta.RESTMapping, noHeaders, withNamespace, wide bool, columnLabels []string) (kubectl.ResourcePrinter, error)

	CmdPrinter       kubectl.ResourcePrinter
	CmdPrinterOutput bool

	NodeNames []string

	// Common optional params
	Selector    string
	PodSelector string
}

func (*NodeOptions) Complete

func (n *NodeOptions) Complete(f *clientcmd.Factory, c *cobra.Command, args []string, out io.Writer) error

func (*NodeOptions) GetNodes

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

func (*NodeOptions) GetPrinters

func (n *NodeOptions) GetPrinters(kind, version string) (kubectl.ResourcePrinter, kubectl.ResourcePrinter, error)

func (*NodeOptions) GetPrintersByObject

func (*NodeOptions) GetPrintersByResource

func (n *NodeOptions) GetPrintersByResource(resource string) (kubectl.ResourcePrinter, kubectl.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

func (*SchedulableOptions) RunSchedulable

func (s *SchedulableOptions) RunSchedulable(node *kapi.Node, ignoreHeaders *bool) error

Jump to

Keyboard shortcuts

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