create

package
v0.7.0-beta.14 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDependency

type CreateDependency func(dryRun []string) error

type CreateOptions

type CreateOptions struct {
	Factory   cmdutil.Factory
	Namespace string

	// Name Resource name of the command line operation
	Name             string
	Args             []string
	Dynamic          dynamic.Interface
	Client           kubernetes.Interface
	Format           printer.Format
	ToPrinter        func(*meta.RESTMapping, bool) (printers.ResourcePrinterFunc, error)
	DryRun           string
	EditBeforeCreate bool

	// CueTemplateName cue template file name to render the resource
	CueTemplateName string

	// Options a command options object which extends CreateOptions that will be used
	// to render the cue template
	Options interface{}

	// GVR is the GroupVersionResource of the resource to be created
	GVR schema.GroupVersionResource

	// CustomOutPut will be executed after creating successfully.
	CustomOutPut func(options *CreateOptions)

	// PreCreate optional, make changes on yaml before create
	PreCreate func(*unstructured.Unstructured) error

	// CleanUpFn will be executed after creating failed.
	CleanUpFn func() error

	// CreateDependencies will be executed before creating.
	CreateDependencies CreateDependency

	// Quiet minimize unnecessary output
	Quiet bool

	genericiooptions.IOStreams
}

CreateOptions the options of creation command should inherit baseOptions

func (*CreateOptions) CleanUp

func (o *CreateOptions) CleanUp() error

func (*CreateOptions) Complete

func (o *CreateOptions) Complete() error

func (*CreateOptions) GetDryRunStrategy

func (o *CreateOptions) GetDryRunStrategy() (DryRunStrategy, error)

func (*CreateOptions) Run

func (o *CreateOptions) Run() error

Run execute command. the options of parameter contain the command flags and args.

type DryRunStrategy

type DryRunStrategy int
const (
	DryRunNone DryRunStrategy = iota
	DryRunClient
	DryRunServer
)

Jump to

Keyboard shortcuts

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