kubectlk8s.io/kubectl/pkg/cmd/label Index | Files

package label

import "k8s.io/kubectl/pkg/cmd/label"

Index

Constants

const (
	MsgNotLabeled = "not labeled"
	MsgLabeled    = "labeled"
	MsgUnLabeled  = "unlabeled"
)

Functions

func NewCmdLabel

func NewCmdLabel(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command

Types

type LabelOptions

type LabelOptions struct {
	// Filename options
	resource.FilenameOptions
	RecordFlags *genericclioptions.RecordFlags

	PrintFlags *genericclioptions.PrintFlags
	ToPrinter  func(string) (printers.ResourcePrinter, error)

	Recorder genericclioptions.Recorder

	// Common shared fields
	genericiooptions.IOStreams
	// contains filtered or unexported fields
}

LabelOptions have the data required to perform the label operation

func NewLabelOptions

func NewLabelOptions(ioStreams genericiooptions.IOStreams) *LabelOptions

func (*LabelOptions) Complete

func (o *LabelOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error

Complete adapts from the command line args and factory to the data required.

func (*LabelOptions) RunLabel

func (o *LabelOptions) RunLabel() error

RunLabel does the work

func (*LabelOptions) Validate

func (o *LabelOptions) Validate() error

Validate checks to the LabelOptions to see if there is sufficient information run the command.

Source Files

label.go

Version
v0.32.3 (latest)
Published
Mar 12, 2025
Platform
linux/amd64
Imports
24 packages
Last checked
5 days ago

Tools for package owners.