create

package
v0.6.0-alpha.17 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: AGPL-3.0 Imports: 22 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 added in v0.6.0

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

	genericclioptions.IOStreams
}

CreateOptions the options of creation command should inherit baseOptions

func (*CreateOptions) CleanUp added in v0.6.0

func (o *CreateOptions) CleanUp() error

func (*CreateOptions) Complete added in v0.6.0

func (o *CreateOptions) Complete() error

func (*CreateOptions) GetDryRunStrategy added in v0.6.0

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

func (*CreateOptions) Run added in v0.6.0

func (o *CreateOptions) Run() error

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

type DryRunStrategy added in v0.6.0

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