create

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NameFromCommandArgs

func NameFromCommandArgs(cmd *cobra.Command, args []string) (string, error)

NameFromCommandArgs is a utility function for commands that assume the first argument is a resource name

func NewCmdCreate

func NewCmdCreate(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command

NewCmdCreate returns new initialized instance of create sub command

func NewCmdCreateBroadcastJob

func NewCmdCreateBroadcastJob(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command

NewCmdCreateBroadcastJob is a command to ease creating BroadcastJobs from AdvancedCronJobs.

func NewCmdCreateCRR added in v1.0.5

func NewCmdCreateCRR(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command

NewCmdCreateCRR is a command to ease creating ContainerRecreateRequest.

func NewCmdCreateJob

func NewCmdCreateJob(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command

NewCmdCreateJob is a command to ease creating Jobs from CronJobs.

func RunEditOnCreate

func RunEditOnCreate(f cmdutil.Factory, printFlags *genericclioptions.PrintFlags, recordFlags *genericclioptions.RecordFlags, ioStreams genericclioptions.IOStreams, cmd *cobra.Command, options *resource.FilenameOptions, fieldManager string) error

RunEditOnCreate performs edit on creation

Types

type CreateBroadcastJobOptions

type CreateBroadcastJobOptions struct {
	PrintFlags *genericclioptions.PrintFlags

	PrintObj func(obj runtime.Object) error

	Name    string
	Image   string
	From    string
	Command []string

	Namespace        string
	EnforceNamespace bool

	DryRunStrategy   cmdutil.DryRunStrategy
	DryRunVerifier   *resource.QueryParamVerifier
	Builder          *resource.Builder
	FieldManager     string
	CreateAnnotation bool

	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

CreateBroadcastJobOptions is the command line options for 'create broadcastJob'

func NewCreateBroadcastJobOptions

func NewCreateBroadcastJobOptions(ioStreams genericclioptions.IOStreams) *CreateBroadcastJobOptions

NewCreateBroadcastJobOptions initializes and returns new CreateBroadcastJobOptions instance

func (*CreateBroadcastJobOptions) Complete

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

Complete completes all the required options

func (*CreateBroadcastJobOptions) Run

Run performs the execution of 'create broadcastJob' sub command

func (*CreateBroadcastJobOptions) Validate

func (o *CreateBroadcastJobOptions) Validate() error

Validate makes sure provided values and valid BroadcastJob options

type CreateCRROptions added in v1.0.5

type CreateCRROptions struct {
	PrintFlags *genericclioptions.PrintFlags

	PrintObj func(obj runtime.Object) error

	PodName                           string
	UnreadyGracePeriodSeconds         int64
	MinStartedSeconds                 int32
	Containers                        []string
	ContainerRecreateRequestContainer []kruiseappsv1alpha1.ContainerRecreateRequestContainer

	Namespace string
	Name      string
	From      string

	ClientSet        kubernetes.Interface
	EnforceNamespace bool
	DryRunStrategy   cmdutil.DryRunStrategy
	DryRunVerifier   *resource.QueryParamVerifier
	Builder          *resource.Builder
	FieldManager     string
	CreateAnnotation bool

	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

CreateCRROptions is the command line options for 'create crr'

func NewCreateCRROptions added in v1.0.5

func NewCreateCRROptions(ioStreams genericclioptions.IOStreams) *CreateCRROptions

NewCreateCRROptions initializes and returns new CreateCRROptions instance

func (*CreateCRROptions) Complete added in v1.0.5

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

Complete completes all the required options

func (*CreateCRROptions) Run added in v1.0.5

func (o *CreateCRROptions) Run() error

Run performs the execution of 'create crr' sub command

func (*CreateCRROptions) Validate added in v1.0.5

func (o *CreateCRROptions) Validate() error

Validate makes sure provided values and valid crr options

type CreateJobOptions

type CreateJobOptions struct {
	PrintFlags *genericclioptions.PrintFlags

	PrintObj func(obj runtime.Object) error

	Name    string
	Image   string
	From    string
	Command []string

	Namespace        string
	EnforceNamespace bool
	Client           batchv1client.BatchV1Interface
	DryRunStrategy   cmdutil.DryRunStrategy
	DryRunVerifier   *resource.QueryParamVerifier
	Builder          *resource.Builder
	FieldManager     string
	CreateAnnotation bool

	genericclioptions.IOStreams
}

CreateJobOptions is the command line options for 'create job'

func NewCreateJobOptions

func NewCreateJobOptions(ioStreams genericclioptions.IOStreams) *CreateJobOptions

NewCreateJobOptions initializes and returns new CreateJobOptions instance

func (*CreateJobOptions) Complete

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

Complete completes all the required options

func (*CreateJobOptions) Run

func (o *CreateJobOptions) Run() error

Run performs the execution of 'create job' sub command

func (*CreateJobOptions) Validate

func (o *CreateJobOptions) Validate() error

Validate makes sure provided values and valid Job options

type CreateOptions

type CreateOptions struct {
	PrintFlags  *genericclioptions.PrintFlags
	RecordFlags *genericclioptions.RecordFlags

	DryRunStrategy cmdutil.DryRunStrategy
	DryRunVerifier *resource.QueryParamVerifier

	FieldValidationVerifier *resource.QueryParamVerifier
	ValidationDirective     string

	FilenameOptions  resource.FilenameOptions
	Selector         string
	EditBeforeCreate bool
	Raw              string

	Recorder genericclioptions.Recorder
	PrintObj func(obj kruntime.Object) error

	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

CreateOptions is the commandline options for 'create' sub command

func NewCreateOptions

func NewCreateOptions(ioStreams genericclioptions.IOStreams) *CreateOptions

NewCreateOptions returns an initialized CreateOptions instance

func (*CreateOptions) Complete

func (o *CreateOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error

Complete completes all the required options

func (*CreateOptions) RunCreate

func (o *CreateOptions) RunCreate(f cmdutil.Factory, cmd *cobra.Command) error

RunCreate performs the creation

func (*CreateOptions) ValidateArgs

func (o *CreateOptions) ValidateArgs(cmd *cobra.Command, args []string) error

ValidateArgs makes sure there is no discrepency in command options

type CreateSubcommandOptions

type CreateSubcommandOptions struct {
	// PrintFlags holds options necessary for obtaining a printer
	PrintFlags *genericclioptions.PrintFlags
	// Name of resource being created
	Name string
	// StructuredGenerator is the resource generator for the object being created
	StructuredGenerator generate.StructuredGenerator
	DryRunStrategy      cmdutil.DryRunStrategy
	DryRunVerifier      *resource.QueryParamVerifier
	CreateAnnotation    bool
	FieldManager        string

	Namespace        string
	EnforceNamespace bool

	Mapper        meta.RESTMapper
	DynamicClient dynamic.Interface

	PrintObj printers.ResourcePrinterFunc

	genericclioptions.IOStreams
}

CreateSubcommandOptions is an options struct to support create subcommands

func NewCreateSubcommandOptions

func NewCreateSubcommandOptions(ioStreams genericclioptions.IOStreams) *CreateSubcommandOptions

NewCreateSubcommandOptions returns initialized CreateSubcommandOptions

func (*CreateSubcommandOptions) Complete

Complete completes all the required options

func (*CreateSubcommandOptions) Run

func (o *CreateSubcommandOptions) Run() error

Run executes a create subcommand using the specified options

Jump to

Keyboard shortcuts

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