Documentation ¶
Index ¶
- func NameFromCommandArgs(cmd *cobra.Command, args []string) (string, error)
- func NewCmdCreate(f cmdutil.Factory, out, errOut io.Writer) *cobra.Command
- func NewCmdCreateClusterRole(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateClusterRoleBinding(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateConfigMap(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateDeployment(f cmdutil.Factory, cmdOut, cmdErr io.Writer) *cobra.Command
- func NewCmdCreateJob(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateNamespace(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreatePodDisruptionBudget(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreatePriorityClass(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateQuota(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateRole(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateRoleBinding(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateSecret(f cmdutil.Factory, cmdOut, errOut io.Writer) *cobra.Command
- func NewCmdCreateSecretDockerRegistry(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateSecretGeneric(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateSecretTLS(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateService(f cmdutil.Factory, cmdOut, errOut io.Writer) *cobra.Command
- func NewCmdCreateServiceAccount(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateServiceClusterIP(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateServiceExternalName(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateServiceLoadBalancer(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func NewCmdCreateServiceNodePort(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command
- func RunCreateSubcommand(f cmdutil.Factory, options *CreateSubcommandOptions) error
- func RunEditOnCreate(f cmdutil.Factory, recordFlags *genericclioptions.RecordFlags, ...) error
- type ClusterRoleBindingOpts
- type ConfigMapOpts
- type CreateClusterRoleOptions
- type CreateJobOptions
- type CreateOptions
- type CreateRoleOptions
- type CreateSubcommandOptions
- type DeploymentOpts
- type NamespaceOpts
- type PodDisruptionBudgetOpts
- type PrintFlags
- type PriorityClassOpts
- type QuotaOpts
- type ResourceOptions
- type RoleBindingOpts
- type SecretDockerRegistryOpts
- type SecretGenericOpts
- type SecretTLSOpts
- type ServiceAccountOpts
- type ServiceClusterIPOpts
- type ServiceExternalNameOpts
- type ServiceLoadBalancerOpts
- type ServiceNodePortOpts
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 NewCmdCreateClusterRole ¶
ClusterRole is a command to ease creating ClusterRoles.
func NewCmdCreateClusterRoleBinding ¶
ClusterRoleBinding is a command to ease creating ClusterRoleBindings.
func NewCmdCreateConfigMap ¶
ConfigMap is a command to ease creating ConfigMaps.
func NewCmdCreateDeployment ¶
NewCmdCreateDeployment is a macro command to create a new deployment. This command is better known to users as `kubectl create deployment`. Note that this command overlaps significantly with the `kubectl run` command.
func NewCmdCreateJob ¶
NewCmdCreateJob is a command to ease creating Jobs from CronJobs.
func NewCmdCreateNamespace ¶
NewCmdCreateNamespace is a macro command to create a new namespace
func NewCmdCreatePodDisruptionBudget ¶
NewCmdCreatePodDisruptionBudget is a macro command to create a new pod disruption budget.
func NewCmdCreatePriorityClass ¶
NewCmdCreatePriorityClass is a macro command to create a new priorityClass.
func NewCmdCreateQuota ¶
NewCmdCreateQuota is a macro command to create a new quota
func NewCmdCreateRole ¶
Role is a command to ease creating Roles.
func NewCmdCreateRoleBinding ¶
RoleBinding is a command to ease creating RoleBindings.
func NewCmdCreateSecret ¶
NewCmdCreateSecret groups subcommands to create various types of secrets
func NewCmdCreateSecretDockerRegistry ¶
NewCmdCreateSecretDockerRegistry is a macro command for creating secrets to work with Docker registries
func NewCmdCreateSecretGeneric ¶
NewCmdCreateSecretGeneric is a command to create generic secrets from files, directories, or literal values
func NewCmdCreateSecretTLS ¶
NewCmdCreateSecretTLS is a macro command for creating secrets to work with Docker registries
func NewCmdCreateService ¶
NewCmdCreateService is a macro command to create a new service
func NewCmdCreateServiceAccount ¶
NewCmdCreateServiceAccount is a macro command to create a new service account
func NewCmdCreateServiceClusterIP ¶
NewCmdCreateServiceClusterIP is a command to create a ClusterIP service
func NewCmdCreateServiceExternalName ¶
NewCmdCreateServiceExternalName is a macro command for creating an ExternalName service
func NewCmdCreateServiceLoadBalancer ¶
NewCmdCreateServiceLoadBalancer is a macro command for creating a LoadBalancer service
func NewCmdCreateServiceNodePort ¶
NewCmdCreateServiceNodePort is a macro command for creating a NodePort service
func RunCreateSubcommand ¶
func RunCreateSubcommand(f cmdutil.Factory, options *CreateSubcommandOptions) error
TODO(juanvallejo): remove dependency on factory here. Complete necessary bits from it in the Complete() method. RunCreateSubcommand executes a create subcommand using the specified options
func RunEditOnCreate ¶
func RunEditOnCreate(f cmdutil.Factory, recordFlags *genericclioptions.RecordFlags, out, errOut io.Writer, cmd *cobra.Command, options *resource.FilenameOptions) error
Types ¶
type ClusterRoleBindingOpts ¶
type ClusterRoleBindingOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
type ConfigMapOpts ¶
type ConfigMapOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
type CreateClusterRoleOptions ¶
type CreateClusterRoleOptions struct { *CreateRoleOptions NonResourceURLs []string }
func (*CreateClusterRoleOptions) RunCreateRole ¶
func (c *CreateClusterRoleOptions) RunCreateRole() error
func (*CreateClusterRoleOptions) Validate ¶
func (c *CreateClusterRoleOptions) Validate() error
type CreateJobOptions ¶
type CreateJobOptions struct { PrintFlags *PrintFlags PrintObj func(obj runtime.Object) error Name string From string Namespace string OutputFormat string Client clientbatchv1.BatchV1Interface Out io.Writer DryRun bool Builder *resource.Builder Cmd *cobra.Command }
func (*CreateJobOptions) RunCreateJob ¶
func (c *CreateJobOptions) RunCreateJob() error
type CreateOptions ¶
type CreateOptions struct { PrintFlags *PrintFlags RecordFlags *genericclioptions.RecordFlags DryRun bool FilenameOptions resource.FilenameOptions Selector string EditBeforeCreate bool Raw string Out io.Writer ErrOut io.Writer Recorder genericclioptions.Recorder PrintObj func(obj kruntime.Object) error }
func NewCreateOptions ¶
func NewCreateOptions(out, errOut io.Writer) *CreateOptions
func (*CreateOptions) ValidateArgs ¶
func (o *CreateOptions) ValidateArgs(cmd *cobra.Command, args []string) error
type CreateRoleOptions ¶
type CreateRoleOptions struct { PrintFlags *PrintFlags Name string Verbs []string Resources []ResourceOptions ResourceNames []string DryRun bool OutputFormat string Namespace string Client clientgorbacv1.RbacV1Interface Mapper meta.RESTMapper Out io.Writer PrintObj func(obj runtime.Object) error }
func (*CreateRoleOptions) RunCreateRole ¶
func (c *CreateRoleOptions) RunCreateRole() error
func (*CreateRoleOptions) Validate ¶
func (c *CreateRoleOptions) Validate() error
type CreateSubcommandOptions ¶
type CreateSubcommandOptions struct { // PrintFlags holds options necessary for obtaining a printer PrintFlags *PrintFlags // Name of resource being created Name string // StructuredGenerator is the resource generator for the object being created StructuredGenerator kubectl.StructuredGenerator // DryRun is true if the command should be simulated but not run against the server DryRun bool CreateAnnotation bool PrintObj func(obj kruntime.Object) error CmdOut io.Writer CmdErr io.Writer }
CreateSubcommandOptions is an options struct to support create subcommands
func (*CreateSubcommandOptions) Complete ¶
func (o *CreateSubcommandOptions) Complete(cmd *cobra.Command, args []string, generator kubectl.StructuredGenerator) error
type DeploymentOpts ¶
type DeploymentOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
type NamespaceOpts ¶
type NamespaceOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
type PodDisruptionBudgetOpts ¶
type PodDisruptionBudgetOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
type PrintFlags ¶
type PrintFlags struct { JSONYamlPrintFlags *printers.JSONYamlPrintFlags NamePrintFlags *printers.NamePrintFlags TemplateFlags *printers.KubeTemplatePrintFlags OutputFormat *string }
PrintFlags composes common printer flag structs used across all create commands, and provides a method of retrieving a known printer based on flag values provided.
func NewPrintFlags ¶
func NewPrintFlags(operation string) *PrintFlags
func (*PrintFlags) AddFlags ¶
func (f *PrintFlags) AddFlags(cmd *cobra.Command)
func (*PrintFlags) Complete ¶
func (f *PrintFlags) Complete(successTemplate string) error
func (*PrintFlags) ToPrinter ¶
func (f *PrintFlags) ToPrinter() (printers.ResourcePrinter, error)
type PriorityClassOpts ¶
type PriorityClassOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
type QuotaOpts ¶
type QuotaOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
type ResourceOptions ¶
type RoleBindingOpts ¶
type RoleBindingOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
type SecretDockerRegistryOpts ¶
type SecretDockerRegistryOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
type SecretGenericOpts ¶
type SecretGenericOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
type SecretTLSOpts ¶
type SecretTLSOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
type ServiceAccountOpts ¶
type ServiceAccountOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
type ServiceClusterIPOpts ¶
type ServiceClusterIPOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
type ServiceExternalNameOpts ¶
type ServiceExternalNameOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
type ServiceLoadBalancerOpts ¶
type ServiceLoadBalancerOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
type ServiceNodePortOpts ¶
type ServiceNodePortOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}