create

package
v0.19.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: Apache-2.0 Imports: 38 Imported by: 25

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 NewCmdCreateClusterRole

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

NewCmdCreateClusterRole initializes and returns new ClusterRoles command

func NewCmdCreateClusterRoleBinding

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

NewCmdCreateClusterRoleBinding returns an initialized command instance of ClusterRoleBinding

func NewCmdCreateConfigMap

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

NewCmdCreateConfigMap initializes and returns ConfigMapOpts

func NewCmdCreateCronJob

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

NewCmdCreateCronJob is a command to create CronJobs.

func NewCmdCreateDeployment

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

NewCmdCreateDeployment is a macro command to create a new deployment. This command is better known to users as `kubectl create deployment`.

func NewCmdCreateJob

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

NewCmdCreateJob is a command to ease creating Jobs from CronJobs.

func NewCmdCreateNamespace

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

NewCmdCreateNamespace is a macro command to create a new namespace

func NewCmdCreatePodDisruptionBudget

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

NewCmdCreatePodDisruptionBudget is a macro command to create a new pod disruption budget.

func NewCmdCreatePriorityClass

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

NewCmdCreatePriorityClass is a macro command to create a new priorityClass.

func NewCmdCreateQuota

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

NewCmdCreateQuota is a macro command to create a new quota

func NewCmdCreateRole

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

NewCmdCreateRole returnns an initialized Command instance for 'create role' sub command

func NewCmdCreateRoleBinding

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

NewCmdCreateRoleBinding returns an initialized Command instance for 'create rolebinding' sub command

func NewCmdCreateSecret

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

NewCmdCreateSecret groups subcommands to create various types of secrets

func NewCmdCreateSecretDockerRegistry

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

NewCmdCreateSecretDockerRegistry is a macro command for creating secrets to work with Docker registries

func NewCmdCreateSecretGeneric

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

NewCmdCreateSecretGeneric is a command to create generic secrets from files, directories, or literal values

func NewCmdCreateSecretTLS

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

NewCmdCreateSecretTLS is a macro command for creating secrets to work with Docker registries

func NewCmdCreateService

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

NewCmdCreateService is a macro command to create a new service

func NewCmdCreateServiceAccount

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

NewCmdCreateServiceAccount is a macro command to create a new service account

func NewCmdCreateServiceClusterIP

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

NewCmdCreateServiceClusterIP is a command to create a ClusterIP service

func NewCmdCreateServiceExternalName

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

NewCmdCreateServiceExternalName is a macro command for creating an ExternalName service

func NewCmdCreateServiceLoadBalancer

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

NewCmdCreateServiceLoadBalancer is a macro command for creating a LoadBalancer service

func NewCmdCreateServiceNodePort

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

NewCmdCreateServiceNodePort is a macro command for creating a NodePort service

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 ClusterRoleBindingOptions added in v0.19.0

type ClusterRoleBindingOptions struct {
	PrintFlags *genericclioptions.PrintFlags
	PrintObj   func(obj runtime.Object) error

	Name             string
	ClusterRole      string
	Users            []string
	Groups           []string
	ServiceAccounts  []string
	FieldManager     string
	CreateAnnotation bool

	Client         rbacclientv1.RbacV1Interface
	DryRunStrategy cmdutil.DryRunStrategy
	DryRunVerifier *resource.DryRunVerifier

	genericclioptions.IOStreams
}

ClusterRoleBindingOptions is returned by NewCmdCreateClusterRoleBinding

func NewClusterRoleBindingOptions added in v0.19.0

func NewClusterRoleBindingOptions(ioStreams genericclioptions.IOStreams) *ClusterRoleBindingOptions

NewClusterRoleBindingOptions creates a new *ClusterRoleBindingOptions with sane defaults

func (*ClusterRoleBindingOptions) Complete added in v0.19.0

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

Complete completes all the required options

func (*ClusterRoleBindingOptions) Run added in v0.19.0

Run calls the CreateSubcommandOptions.Run in ClusterRoleBindingOptions instance

type ConfigMapOpts

type ConfigMapOpts struct {
	CreateSubcommandOptions *CreateSubcommandOptions
}

ConfigMapOpts holds properties for create configmap sub-command

func (*ConfigMapOpts) Complete

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

Complete completes all the required options

func (*ConfigMapOpts) Run

func (o *ConfigMapOpts) Run() error

Run performs the execution of 'create' sub command options

type CreateClusterRoleOptions

type CreateClusterRoleOptions struct {
	*CreateRoleOptions
	NonResourceURLs []string
	AggregationRule map[string]string
	FieldManager    string
}

CreateClusterRoleOptions is returned by NewCmdCreateClusterRole

func (*CreateClusterRoleOptions) Complete

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

Complete completes all the required options

func (*CreateClusterRoleOptions) RunCreateRole

func (c *CreateClusterRoleOptions) RunCreateRole() error

RunCreateRole creates a new clusterRole

func (*CreateClusterRoleOptions) Validate

func (c *CreateClusterRoleOptions) Validate() error

Validate makes sure there is no discrepency in CreateClusterRoleOptions

type CreateCronJobOptions

type CreateCronJobOptions struct {
	PrintFlags *genericclioptions.PrintFlags

	PrintObj func(obj runtime.Object) error

	Name     string
	Image    string
	Schedule string
	Command  []string
	Restart  string

	Namespace        string
	EnforceNamespace bool
	Client           batchv1beta1client.BatchV1beta1Interface
	DryRunStrategy   cmdutil.DryRunStrategy
	DryRunVerifier   *resource.DryRunVerifier
	Builder          *resource.Builder
	FieldManager     string
	CreateAnnotation bool

	genericclioptions.IOStreams
}

func NewCreateCronJobOptions

func NewCreateCronJobOptions(ioStreams genericclioptions.IOStreams) *CreateCronJobOptions

func (*CreateCronJobOptions) Complete

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

func (*CreateCronJobOptions) Run

func (o *CreateCronJobOptions) Run() error

type CreateDeploymentOptions added in v0.19.0

type CreateDeploymentOptions struct {
	PrintFlags *genericclioptions.PrintFlags

	PrintObj func(obj runtime.Object) error

	Name             string
	Images           []string
	Port             int32
	Replicas         int32
	Command          []string
	Namespace        string
	EnforceNamespace bool
	FieldManager     string
	CreateAnnotation bool

	Client         appsv1client.AppsV1Interface
	DryRunStrategy cmdutil.DryRunStrategy
	DryRunVerifier *resource.DryRunVerifier

	genericclioptions.IOStreams
}

CreateDeploymentOptions is returned by NewCmdCreateDeployment

func NewCreateCreateDeploymentOptions added in v0.19.0

func NewCreateCreateDeploymentOptions(ioStreams genericclioptions.IOStreams) *CreateDeploymentOptions

func (*CreateDeploymentOptions) Complete added in v0.19.0

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

Complete completes all the options

func (*CreateDeploymentOptions) Run added in v0.19.0

func (o *CreateDeploymentOptions) Run() error

Run performs the execution of 'create deployment' sub command

func (*CreateDeploymentOptions) Validate added in v0.19.0

func (o *CreateDeploymentOptions) Validate() error

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) 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.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) 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 CreateRoleOptions

type CreateRoleOptions struct {
	PrintFlags *genericclioptions.PrintFlags

	Name          string
	Verbs         []string
	Resources     []ResourceOptions
	ResourceNames []string

	DryRunStrategy   cmdutil.DryRunStrategy
	DryRunVerifier   *resource.DryRunVerifier
	OutputFormat     string
	Namespace        string
	EnforceNamespace bool
	Client           clientgorbacv1.RbacV1Interface
	Mapper           meta.RESTMapper
	PrintObj         func(obj runtime.Object) error
	FieldManager     string
	CreateAnnotation bool

	genericclioptions.IOStreams
}

CreateRoleOptions holds the options for 'create role' sub command

func NewCreateRoleOptions

func NewCreateRoleOptions(ioStreams genericclioptions.IOStreams) *CreateRoleOptions

NewCreateRoleOptions returns an initialized CreateRoleOptions instance

func (*CreateRoleOptions) Complete

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

Complete completes all the required options

func (*CreateRoleOptions) RunCreateRole

func (o *CreateRoleOptions) RunCreateRole() error

RunCreateRole performs the execution of 'create role' sub command

func (*CreateRoleOptions) Validate

func (o *CreateRoleOptions) Validate() error

Validate makes sure there is no discrepency in provided option values

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

Complete completes all the required options

func (*CreateSubcommandOptions) Run

func (o *CreateSubcommandOptions) Run() error

Run executes a create subcommand using the specified options

type NamespaceOpts

type NamespaceOpts struct {
	CreateSubcommandOptions *CreateSubcommandOptions
}

NamespaceOpts is the options for 'create namespace' sub command

func (*NamespaceOpts) Complete

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

Complete completes all the required options

func (*NamespaceOpts) Run

func (o *NamespaceOpts) Run() error

Run calls the CreateSubcommandOptions.Run in NamespaceOpts instance

type PodDisruptionBudgetOpts

type PodDisruptionBudgetOpts struct {
	CreateSubcommandOptions *CreateSubcommandOptions
}

PodDisruptionBudgetOpts holds the command-line options for poddisruptionbudget sub command

func (*PodDisruptionBudgetOpts) Complete

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

Complete completes all the required options

func (*PodDisruptionBudgetOpts) Run

func (o *PodDisruptionBudgetOpts) Run() error

Run calls the CreateSubcommandOptions.Run in PodDisruptionBudgetOpts instance

type PriorityClassOpts

type PriorityClassOpts struct {
	CreateSubcommandOptions *CreateSubcommandOptions
}

PriorityClassOpts holds the options for 'create priorityclass' sub command

func (*PriorityClassOpts) Complete

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

Complete completes all the required options

func (*PriorityClassOpts) Run

func (o *PriorityClassOpts) Run() error

Run calls the CreateSubcommandOptions.Run in the PriorityClassOpts instance

type QuotaOpts

type QuotaOpts struct {
	CreateSubcommandOptions *CreateSubcommandOptions
}

QuotaOpts holds the command-line options for 'create quota' sub command

func (*QuotaOpts) Complete

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

Complete completes all the required options

func (*QuotaOpts) Run

func (o *QuotaOpts) Run() error

Run calls the CreateSubcommandOptions.Run in QuotaOpts instance

type ResourceOptions

type ResourceOptions struct {
	Group       string
	Resource    string
	SubResource string
}

ResourceOptions holds the related options for '--resource' option

type RoleBindingOpts

type RoleBindingOpts struct {
	CreateSubcommandOptions *CreateSubcommandOptions
}

RoleBindingOpts holds the options for 'create rolebinding' sub command

func (*RoleBindingOpts) Complete

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

Complete completes all the required options

func (*RoleBindingOpts) Run

func (o *RoleBindingOpts) Run() error

Run calls the CreateSubcommandOptions.Run in RoleBindingOpts instance

type SecretDockerRegistryOpts

type SecretDockerRegistryOpts struct {
	CreateSubcommandOptions *CreateSubcommandOptions
}

SecretDockerRegistryOpts holds the options for 'create secret docker-registry' sub command

func (*SecretDockerRegistryOpts) Complete

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

Complete completes all the required options

func (*SecretDockerRegistryOpts) Run

Run calls CreateSubcommandOptions.Run in SecretDockerRegistryOpts instance

type SecretGenericOpts

type SecretGenericOpts struct {
	CreateSubcommandOptions *CreateSubcommandOptions
}

SecretGenericOpts holds the options for 'create secret' sub command

func (*SecretGenericOpts) Complete

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

Complete completes all the required options

func (*SecretGenericOpts) Run

func (o *SecretGenericOpts) Run() error

Run calls the CreateSubcommandOptions.Run in SecretGenericOpts instance

type SecretTLSOpts

type SecretTLSOpts struct {
	CreateSubcommandOptions *CreateSubcommandOptions
}

SecretTLSOpts holds the options for 'create secret tls' sub command

func (*SecretTLSOpts) Complete

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

Complete completes all the required options

func (*SecretTLSOpts) Run

func (o *SecretTLSOpts) Run() error

Run calls CreateSubcommandOptions.Run in the SecretTLSOpts instance

type ServiceAccountOpts

type ServiceAccountOpts struct {
	CreateSubcommandOptions *CreateSubcommandOptions
}

ServiceAccountOpts holds the options for 'create serviceaccount' sub command

func (*ServiceAccountOpts) Complete

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

Complete completes all the required options

func (*ServiceAccountOpts) Run

func (o *ServiceAccountOpts) Run() error

Run calls the CreateSubcommandOptions.Run in ServiceAccountOpts instance

type ServiceClusterIPOpts

type ServiceClusterIPOpts struct {
	CreateSubcommandOptions *CreateSubcommandOptions
}

ServiceClusterIPOpts holds the options for 'create service clusterip' sub command

func (*ServiceClusterIPOpts) Complete

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

Complete completes all the required options

func (*ServiceClusterIPOpts) Run

func (o *ServiceClusterIPOpts) Run() error

Run calls the CreateSubcommandOptions.Run in ServiceClusterIPOpts instance

type ServiceExternalNameOpts

type ServiceExternalNameOpts struct {
	CreateSubcommandOptions *CreateSubcommandOptions
}

ServiceExternalNameOpts holds the options for 'create service externalname' sub command

func (*ServiceExternalNameOpts) Complete

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

Complete completes all the required options

func (*ServiceExternalNameOpts) Run

func (o *ServiceExternalNameOpts) Run() error

Run calls the CreateSubcommandOptions.Run in ServiceExternalNameOpts instance

type ServiceLoadBalancerOpts

type ServiceLoadBalancerOpts struct {
	CreateSubcommandOptions *CreateSubcommandOptions
}

ServiceLoadBalancerOpts holds the options for 'create service loadbalancer' sub command

func (*ServiceLoadBalancerOpts) Complete

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

Complete completes all the required options

func (*ServiceLoadBalancerOpts) Run

func (o *ServiceLoadBalancerOpts) Run() error

Run calls the CreateSubcommandOptions.Run in ServiceLoadBalancerOpts instance

type ServiceNodePortOpts

type ServiceNodePortOpts struct {
	CreateSubcommandOptions *CreateSubcommandOptions
}

ServiceNodePortOpts holds the options for 'create service nodeport' sub command

func (*ServiceNodePortOpts) Complete

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

Complete completes all the required options

func (*ServiceNodePortOpts) Run

func (o *ServiceNodePortOpts) Run() error

Run calls the CreateSubcommandOptions.Run in ServiceNodePortOpts instance

Jump to

Keyboard shortcuts

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