Documentation
¶
Index ¶
- func NameFromCommandArgs(cmd *cobra.Command, args []string) (string, error)
- func NewCmdCreate(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateClusterRole(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateClusterRoleBinding(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateConfigMap(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateCronJob(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateDeployment(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateIngress(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateJob(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateNamespace(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreatePodDisruptionBudget(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreatePriorityClass(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateQuota(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateRole(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateRoleBinding(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateSecret(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateSecretDockerRegistry(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateSecretGeneric(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateSecretTLS(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateService(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateServiceAccount(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateServiceClusterIP(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateServiceExternalName(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateServiceLoadBalancer(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateServiceNodePort(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func RunEditOnCreate(f cmdutil.Factory, printFlags *genericclioptions.PrintFlags, ...) error
- type ClusterRoleBindingOptions
- type ConfigMapOpts
- type CreateClusterRoleOptions
- type CreateCronJobOptions
- type CreateDeploymentOptions
- type CreateIngressOptions
- type CreateJobOptions
- type CreateOptions
- type CreateRoleOptions
- type CreateSubcommandOptions
- type NamespaceOpts
- type PodDisruptionBudgetOpts
- type PriorityClassOptions
- type QuotaOpts
- type ResourceOptions
- type RoleBindingOptions
- type SecretDockerRegistryOpts
- type SecretGenericOpts
- type SecretTLSOpts
- type ServiceAccountOpts
- type ServiceOptions
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 NewCmdCreateIngress ¶ added in v0.20.0
func NewCmdCreateIngress(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
NewCmdCreateIngress is a macro command to create a new ingress. This command is better known to users as `kubectl create ingress`.
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
type ConfigMapOpts ¶
type ConfigMapOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
ConfigMapOpts holds properties for create configmap sub-command
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
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
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 NewCreateDeploymentOptions ¶ added in v0.20.0
func NewCreateDeploymentOptions(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
type CreateIngressOptions ¶ added in v0.20.0
type CreateIngressOptions struct {
PrintFlags *genericclioptions.PrintFlags
PrintObj func(obj runtime.Object) error
Name string
IngressClass string
Rules []string
Annotations []string
DefaultBackend string
Namespace string
EnforceNamespace bool
CreateAnnotation bool
Client networkingv1client.NetworkingV1Interface
DryRunStrategy cmdutil.DryRunStrategy
DryRunVerifier *resource.DryRunVerifier
FieldManager string
genericclioptions.IOStreams
}
CreateIngressOptions is returned by NewCmdCreateIngress
func NewCreateIngressOptions ¶ added in v0.20.0
func NewCreateIngressOptions(ioStreams genericclioptions.IOStreams) *CreateIngressOptions
NewCreateIngressOptions creates the CreateIngressOptions to be used later
func (*CreateIngressOptions) Complete ¶ added in v0.20.0
func (o *CreateIngressOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
Complete completes all the 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) Complete ¶
func (o *CreateJobOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
Complete completes all the required 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
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
type NamespaceOpts ¶
type NamespaceOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
NamespaceOpts is the options for 'create namespace' sub command
type PodDisruptionBudgetOpts ¶
type PodDisruptionBudgetOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
PodDisruptionBudgetOpts holds the command-line options for poddisruptionbudget sub command
type PriorityClassOptions ¶ added in v0.20.0
type PriorityClassOptions struct {
PrintFlags *genericclioptions.PrintFlags
PrintObj func(obj runtime.Object) error
Name string
Value int32
GlobalDefault bool
Description string
PreemptionPolicy string
FieldManager string
CreateAnnotation bool
Client *schedulingv1client.SchedulingV1Client
DryRunStrategy cmdutil.DryRunStrategy
DryRunVerifier *resource.DryRunVerifier
genericclioptions.IOStreams
}
PriorityClassOptions holds the options for 'create priorityclass' sub command
func NewPriorityClassOptions ¶ added in v0.20.0
func NewPriorityClassOptions(ioStreams genericclioptions.IOStreams) *PriorityClassOptions
type QuotaOpts ¶
type QuotaOpts struct {
// PrintFlags holds options necessary for obtaining a printer
PrintFlags *genericclioptions.PrintFlags
PrintObj func(obj runtime.Object) error
// The name of a quota object.
Name string
// The hard resource limit string before parsing.
Hard string
// The scopes of a quota object before parsing.
Scopes string
CreateAnnotation bool
FieldManager string
Namespace string
EnforceNamespace bool
Client *coreclient.CoreV1Client
DryRunStrategy cmdutil.DryRunStrategy
DryRunVerifier *resourcecli.DryRunVerifier
genericclioptions.IOStreams
}
QuotaOpts holds the command-line options for 'create quota' sub command
func NewQuotaOpts ¶ added in v0.20.0
func NewQuotaOpts(ioStreams genericclioptions.IOStreams) *QuotaOpts
NewQuotaOpts creates a new *QuotaOpts with sane defaults
type ResourceOptions ¶
type ResourceOptions struct {
Group string
Resource string
SubResource string
}
ResourceOptions holds the related options for '--resource' option
type RoleBindingOptions ¶ added in v0.20.0
type RoleBindingOptions struct {
PrintFlags *genericclioptions.PrintFlags
PrintObj func(obj runtime.Object) error
Name string
Namespace string
EnforceNamespace bool
ClusterRole string
Role string
Users []string
Groups []string
ServiceAccounts []string
FieldManager string
CreateAnnotation bool
Client rbacclientv1.RbacV1Interface
DryRunStrategy cmdutil.DryRunStrategy
DryRunVerifier *resource.DryRunVerifier
genericclioptions.IOStreams
}
RoleBindingOpts holds the options for 'create rolebinding' sub command
func NewRoleBindingOptions ¶ added in v0.20.0
func NewRoleBindingOptions(ioStreams genericclioptions.IOStreams) *RoleBindingOptions
NewRoleBindingOptions creates a new *RoleBindingOptions with sane defaults
func (*RoleBindingOptions) Complete ¶ added in v0.20.0
func (o *RoleBindingOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
Complete completes all the required options
type SecretDockerRegistryOpts ¶
type SecretDockerRegistryOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
SecretDockerRegistryOpts holds the options for 'create secret docker-registry' sub command
type SecretGenericOpts ¶
type SecretGenericOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
SecretGenericOpts holds the options for 'create secret' sub command
type SecretTLSOpts ¶
type SecretTLSOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
SecretTLSOpts holds the options for 'create secret tls' sub command
type ServiceAccountOpts ¶
type ServiceAccountOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
ServiceAccountOpts holds the options for 'create serviceaccount' sub command
type ServiceOptions ¶ added in v0.20.0
type ServiceOptions struct {
PrintFlags *genericclioptions.PrintFlags
PrintObj func(obj runtime.Object) error
Name string
TCP []string
Type corev1.ServiceType
ClusterIP string
NodePort int
ExternalName string
FieldManager string
CreateAnnotation bool
Namespace string
Client corev1client.CoreV1Interface
DryRunStrategy cmdutil.DryRunStrategy
DryRunVerifier *resource.DryRunVerifier
genericclioptions.IOStreams
}
ServiceOptions holds the options for 'create service' sub command
func NewServiceOptions ¶ added in v0.20.0
func NewServiceOptions(ioStreams genericclioptions.IOStreams, serviceType corev1.ServiceType) *ServiceOptions
NewServiceOptions creates a ServiceOptions struct
func (*ServiceOptions) Complete ¶ added in v0.20.0
func (o *ServiceOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
Complete completes all the required options
Source Files
¶
- create.go
- create_clusterrole.go
- create_clusterrolebinding.go
- create_configmap.go
- create_cronjob.go
- create_deployment.go
- create_ingress.go
- create_job.go
- create_namespace.go
- create_pdb.go
- create_priorityclass.go
- create_quota.go
- create_role.go
- create_rolebinding.go
- create_secret.go
- create_service.go
- create_serviceaccount.go