cmd

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EvictionSubresource = "pods/eviction"
	EvictionKind        = "Eviction"
)

Variables

This section is empty.

Functions

func NewCmdEvict

func NewCmdEvict(streams genericclioptions.IOStreams) *cobra.Command

NewCmdEvict provides a cobra command wrapping EvictOptions

Types

type Client

type Client interface {
	EvictPod(ctx context.Context, pod corev1.Pod, opts *metav1.DeleteOptions) error
}

func NewEvictClient

func NewEvictClient(clientset kubernetes.Interface) Client

type ClientV1

type ClientV1 struct {
	// contains filtered or unexported fields
}

func (*ClientV1) EvictPod

func (c *ClientV1) EvictPod(ctx context.Context, pod corev1.Pod, opts *metav1.DeleteOptions) error

type ClientV1beta1

type ClientV1beta1 struct {
	// contains filtered or unexported fields
}

func (*ClientV1beta1) EvictPod

func (c *ClientV1beta1) EvictPod(ctx context.Context, pod corev1.Pod, opts *metav1.DeleteOptions) error

type EvictOptions

type EvictOptions struct {
	GracePeriodSeconds int64
	DryRun             bool

	ResourceArg string
	Selector    string
	Object      runtime.Object

	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

func NewEvictOptions

func NewEvictOptions(streams genericclioptions.IOStreams) *EvictOptions

func (*EvictOptions) Complete

func (o *EvictOptions) Complete(cmd *cobra.Command, args []string) error

func (*EvictOptions) RunEvict

func (o *EvictOptions) RunEvict(ctx context.Context) error

Run evicts a pod or pods on the resources

Jump to

Keyboard shortcuts

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