Documentation ¶
Index ¶
- func NameFromCommandArgs(cmd *cobra.Command, args []string) (string, error)
- func NewCmdCreate(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateBroadcastJob(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateCRR(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateJob(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func RunEditOnCreate(f cmdutil.Factory, printFlags *genericclioptions.PrintFlags, ...) error
- type CreateBroadcastJobOptions
- type CreateCRROptions
- type CreateJobOptions
- type CreateOptions
- type CreateSubcommandOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NameFromCommandArgs ¶
NameFromCommandArgs is a utility function for commands that assume the first argument is a resource name
func NewCmdCreate ¶
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 ¶
NewCmdCreateCRR is a command to ease creating ContainerRecreateRequest.
func NewCmdCreateJob ¶
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.DryRunVerifier 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 ¶
func (o *CreateBroadcastJobOptions) Run() error
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 ¶
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.DryRunVerifier 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 ¶
func NewCreateCRROptions(ioStreams genericclioptions.IOStreams) *CreateCRROptions
NewCreateCRROptions initializes and returns new CreateCRROptions instance
func (*CreateCRROptions) Run ¶
func (o *CreateCRROptions) Run() error
Run performs the execution of 'create crr' sub command
func (*CreateCRROptions) Validate ¶
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.DryRunVerifier 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) 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.DryRunVerifier 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) 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.DryRunVerifier 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 ¶
func (o *CreateSubcommandOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string, generator generate.StructuredGenerator) error
Complete completes all the required options
func (*CreateSubcommandOptions) Run ¶
func (o *CreateSubcommandOptions) Run() error
Run executes a create subcommand using the specified options