Documentation ¶
Index ¶
- func AddSpecialVerb(verb string, gr schema.GroupResource)
- func NameFromCommandArgs(cmd *cobra.Command, args []string) (string, error)
- func NewCmdCreate(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateClusterRole(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateClusterRoleBinding(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateConfigMap(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateCronJob(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateDeployment(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateIngress(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateJob(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateNamespace(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreatePodDisruptionBudget(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreatePriorityClass(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateQuota(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateRole(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateRoleBinding(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateSecret(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateSecretDockerRegistry(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateSecretGeneric(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateSecretTLS(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateService(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateServiceAccount(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateServiceClusterIP(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateServiceExternalName(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateServiceLoadBalancer(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateServiceNodePort(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdCreateToken(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func RunEditOnCreate(f cmdutil.Factory, printFlags *genericclioptions.PrintFlags, ...) error
- type ClusterRoleBindingOptions
- type ConfigMapOptions
- type CreateClusterRoleOptions
- type CreateCronJobOptions
- type CreateDeploymentOptions
- type CreateIngressOptions
- type CreateJobOptions
- type CreateOptions
- type CreateRoleOptions
- type CreateSecretDockerRegistryOptions
- type CreateSecretOptions
- type CreateSecretTLSOptions
- type CreateSubcommandOptions
- type DockerConfig
- type DockerConfigEntry
- type DockerConfigJSON
- type NamespaceOptions
- type PodDisruptionBudgetOpts
- type PriorityClassOptions
- type QuotaOpts
- type ResourceOptions
- type RoleBindingOptions
- type ServiceAccountOpts
- type ServiceOptions
- type TokenOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSpecialVerb ¶ added in v0.24.0
func AddSpecialVerb(verb string, gr schema.GroupResource)
AddSpecialVerb allows the addition of items to the `specialVerbs` map for non-k8s native resources.
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 NewCmdCreateClusterRole ¶
func NewCmdCreateClusterRole(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
NewCmdCreateClusterRole initializes and returns new ClusterRoles command
func NewCmdCreateClusterRoleBinding ¶
func NewCmdCreateClusterRoleBinding(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
NewCmdCreateClusterRoleBinding returns an initialized command instance of ClusterRoleBinding
func NewCmdCreateConfigMap ¶
NewCmdCreateConfigMap creates the `create configmap` Cobra command
func NewCmdCreateCronJob ¶
NewCmdCreateCronJob is a command to create CronJobs.
func NewCmdCreateDeployment ¶
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
NewCmdCreateIngress is a macro command to create a new ingress. This command is better known to users as `kubectl create ingress`.
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 ¶
func NewCmdCreatePodDisruptionBudget(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
NewCmdCreatePodDisruptionBudget is a macro command to create a new pod disruption budget.
func NewCmdCreatePriorityClass ¶
func NewCmdCreatePriorityClass(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
NewCmdCreatePriorityClass is a macro command to create a new priorityClass.
func NewCmdCreateQuota ¶
NewCmdCreateQuota is a macro command to create a new quota
func NewCmdCreateRole ¶
NewCmdCreateRole returnns an initialized Command instance for 'create role' sub command
func NewCmdCreateRoleBinding ¶
func NewCmdCreateRoleBinding(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
NewCmdCreateRoleBinding returns an initialized Command instance for 'create rolebinding' sub command
func NewCmdCreateSecret ¶
NewCmdCreateSecret groups subcommands to create various types of secrets. This is the entry point of create_secret.go which will be called by create.go
func NewCmdCreateSecretDockerRegistry ¶
func NewCmdCreateSecretDockerRegistry(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
NewCmdCreateSecretDockerRegistry is a macro command for creating secrets to work with Docker registries
func NewCmdCreateSecretGeneric ¶
func NewCmdCreateSecretGeneric(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
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 TLS client or server
func NewCmdCreateService ¶
NewCmdCreateService is a macro command to create a new service
func NewCmdCreateServiceAccount ¶
func NewCmdCreateServiceAccount(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
NewCmdCreateServiceAccount is a macro command to create a new service account
func NewCmdCreateServiceClusterIP ¶
func NewCmdCreateServiceClusterIP(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
NewCmdCreateServiceClusterIP is a command to create a ClusterIP service
func NewCmdCreateServiceExternalName ¶
func NewCmdCreateServiceExternalName(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
NewCmdCreateServiceExternalName is a macro command for creating an ExternalName service
func NewCmdCreateServiceLoadBalancer ¶
func NewCmdCreateServiceLoadBalancer(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
NewCmdCreateServiceLoadBalancer is a macro command for creating a LoadBalancer service
func NewCmdCreateServiceNodePort ¶
func NewCmdCreateServiceNodePort(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
NewCmdCreateServiceNodePort is a macro command for creating a NodePort service
func NewCmdCreateToken ¶ added in v0.24.0
NewCmdCreateToken returns an initialized Command for 'create token' sub command
func RunEditOnCreate ¶
func RunEditOnCreate(f cmdutil.Factory, printFlags *genericclioptions.PrintFlags, recordFlags *genericclioptions.RecordFlags, ioStreams genericiooptions.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 ValidationDirective string genericiooptions.IOStreams }
ClusterRoleBindingOptions is returned by NewCmdCreateClusterRoleBinding
func NewClusterRoleBindingOptions ¶ added in v0.19.0
func NewClusterRoleBindingOptions(ioStreams genericiooptions.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
func (o *ClusterRoleBindingOptions) Run() error
Run calls the CreateSubcommandOptions.Run in ClusterRoleBindingOptions instance
type ConfigMapOptions ¶ added in v0.21.0
type ConfigMapOptions struct { // PrintFlags holds options necessary for obtaining a printer PrintFlags *genericclioptions.PrintFlags PrintObj func(obj runtime.Object) error // Name of configMap (required) Name string // Type of configMap (optional) Type string // FileSources to derive the configMap from (optional) FileSources []string // LiteralSources to derive the configMap from (optional) LiteralSources []string // EnvFileSources to derive the configMap from (optional) EnvFileSources []string // AppendHash; if true, derive a hash from the ConfigMap and append it to the name AppendHash bool FieldManager string CreateAnnotation bool Namespace string EnforceNamespace bool Client corev1client.CoreV1Interface DryRunStrategy cmdutil.DryRunStrategy ValidationDirective string genericiooptions.IOStreams }
ConfigMapOptions holds properties for create configmap sub-command
func NewConfigMapOptions ¶ added in v0.21.0
func NewConfigMapOptions(ioStreams genericiooptions.IOStreams) *ConfigMapOptions
NewConfigMapOptions creates a new *ConfigMapOptions with default value
func (*ConfigMapOptions) Complete ¶ added in v0.21.0
Complete loads data from the command line environment
func (*ConfigMapOptions) Run ¶ added in v0.21.0
func (o *ConfigMapOptions) Run() error
Run calls createConfigMap and filled in value for configMap object
func (*ConfigMapOptions) Validate ¶ added in v0.21.0
func (o *ConfigMapOptions) Validate() error
Validate checks if ConfigMapOptions has sufficient value to run
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 batchv1client.BatchV1Interface DryRunStrategy cmdutil.DryRunStrategy ValidationDirective string Builder *resource.Builder FieldManager string CreateAnnotation bool genericiooptions.IOStreams }
CreateCronJobOptions is returned by NewCreateCronJobOptions
func NewCreateCronJobOptions ¶
func NewCreateCronJobOptions(ioStreams genericiooptions.IOStreams) *CreateCronJobOptions
NewCreateCronJobOptions returns an initialized CreateCronJobOptions instance
func (*CreateCronJobOptions) Run ¶
func (o *CreateCronJobOptions) Run() error
Run performs the execution of 'create cronjob' sub command
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 ValidationDirective string genericiooptions.IOStreams }
CreateDeploymentOptions is returned by NewCmdCreateDeployment
func NewCreateDeploymentOptions ¶ added in v0.20.0
func NewCreateDeploymentOptions(ioStreams genericiooptions.IOStreams) *CreateDeploymentOptions
NewCreateDeploymentOptions returns an initialized CreateDeploymentOptions instance
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
Validate makes sure there is no discrepency in provided option values
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 ValidationDirective string FieldManager string genericiooptions.IOStreams }
CreateIngressOptions is returned by NewCmdCreateIngress
func NewCreateIngressOptions ¶ added in v0.20.0
func NewCreateIngressOptions(ioStreams genericiooptions.IOStreams) *CreateIngressOptions
NewCreateIngressOptions creates the CreateIngressOptions to be used later
func (*CreateIngressOptions) Run ¶ added in v0.20.0
func (o *CreateIngressOptions) Run() error
Run performs the execution of 'create ingress' sub command
func (*CreateIngressOptions) Validate ¶ added in v0.20.0
func (o *CreateIngressOptions) Validate() error
Validate validates the Ingress object to be created
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 ValidationDirective string Builder *resource.Builder FieldManager string CreateAnnotation bool genericiooptions.IOStreams }
CreateJobOptions is the command line options for 'create job'
func NewCreateJobOptions ¶
func NewCreateJobOptions(ioStreams genericiooptions.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 ValidationDirective string FilenameOptions resource.FilenameOptions Selector string EditBeforeCreate bool Raw string Recorder genericclioptions.Recorder PrintObj func(obj kruntime.Object) error genericiooptions.IOStreams // contains filtered or unexported fields }
CreateOptions is the commandline options for 'create' sub command
func NewCreateOptions ¶
func NewCreateOptions(ioStreams genericiooptions.IOStreams) *CreateOptions
NewCreateOptions returns an initialized CreateOptions instance
func (*CreateOptions) Validate ¶ added in v0.25.0
func (o *CreateOptions) Validate() error
Validate 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 ValidationDirective string OutputFormat string Namespace string EnforceNamespace bool Client clientgorbacv1.RbacV1Interface Mapper meta.RESTMapper PrintObj func(obj runtime.Object) error FieldManager string CreateAnnotation bool genericiooptions.IOStreams }
CreateRoleOptions holds the options for 'create role' sub command
func NewCreateRoleOptions ¶
func NewCreateRoleOptions(ioStreams genericiooptions.IOStreams) *CreateRoleOptions
NewCreateRoleOptions returns an initialized CreateRoleOptions instance
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 CreateSecretDockerRegistryOptions ¶ added in v0.21.0
type CreateSecretDockerRegistryOptions struct { // PrintFlags holds options necessary for obtaining a printer PrintFlags *genericclioptions.PrintFlags PrintObj func(obj runtime.Object) error // Name of secret (required) Name string // FileSources to derive the secret from (optional) FileSources []string // Username for registry (required) Username string // Email for registry (optional) Email string // Password for registry (required) Password string `datapolicy:"password"` // Server for registry (required) Server string // AppendHash; if true, derive a hash from the Secret and append it to the name AppendHash bool FieldManager string CreateAnnotation bool Namespace string EnforceNamespace bool Client corev1client.CoreV1Interface DryRunStrategy cmdutil.DryRunStrategy ValidationDirective string genericiooptions.IOStreams }
CreateSecretDockerRegistryOptions holds the options for 'create secret docker-registry' sub command
func NewSecretDockerRegistryOptions ¶ added in v0.21.0
func NewSecretDockerRegistryOptions(ioStreams genericiooptions.IOStreams) *CreateSecretDockerRegistryOptions
NewSecretDockerRegistryOptions creates a new *CreateSecretDockerRegistryOptions with default value
func (*CreateSecretDockerRegistryOptions) Complete ¶ added in v0.21.0
func (o *CreateSecretDockerRegistryOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
Complete loads data from the command line environment
func (*CreateSecretDockerRegistryOptions) Run ¶ added in v0.21.0
func (o *CreateSecretDockerRegistryOptions) Run() error
Run calls createSecretDockerRegistry which will create secretDockerRegistry based on CreateSecretDockerRegistryOptions and makes an API call to the server
func (*CreateSecretDockerRegistryOptions) Validate ¶ added in v0.21.0
func (o *CreateSecretDockerRegistryOptions) Validate() error
Validate checks if CreateSecretDockerRegistryOptions has sufficient value to run
type CreateSecretOptions ¶ added in v0.21.0
type CreateSecretOptions struct { // PrintFlags holds options necessary for obtaining a printer PrintFlags *genericclioptions.PrintFlags PrintObj func(obj runtime.Object) error // Name of secret (required) Name string // Type of secret (optional) Type string // FileSources to derive the secret from (optional) FileSources []string // LiteralSources to derive the secret from (optional) LiteralSources []string // EnvFileSources to derive the secret from (optional) EnvFileSources []string // AppendHash; if true, derive a hash from the Secret data and type and append it to the name AppendHash bool FieldManager string CreateAnnotation bool Namespace string EnforceNamespace bool Client corev1client.CoreV1Interface DryRunStrategy cmdutil.DryRunStrategy ValidationDirective string genericiooptions.IOStreams }
CreateSecretOptions holds the options for 'create secret' sub command
func NewSecretOptions ¶ added in v0.21.0
func NewSecretOptions(ioStreams genericiooptions.IOStreams) *CreateSecretOptions
NewSecretOptions creates a new *CreateSecretOptions with default value
func (*CreateSecretOptions) Complete ¶ added in v0.21.0
Complete loads data from the command line environment
func (*CreateSecretOptions) Run ¶ added in v0.21.0
func (o *CreateSecretOptions) Run() error
Run calls createSecret which will create secret based on CreateSecretOptions and makes an API call to the server
func (*CreateSecretOptions) Validate ¶ added in v0.21.0
func (o *CreateSecretOptions) Validate() error
Validate checks if CreateSecretOptions has sufficient value to run
type CreateSecretTLSOptions ¶ added in v0.21.0
type CreateSecretTLSOptions struct { // PrintFlags holds options necessary for obtaining a printer PrintFlags *genericclioptions.PrintFlags PrintObj func(obj runtime.Object) error // Name is the name of this TLS secret. Name string // Key is the path to the user's private key. Key string // Cert is the path to the user's public key certificate. Cert string // AppendHash; if true, derive a hash from the Secret and append it to the name AppendHash bool FieldManager string CreateAnnotation bool Namespace string EnforceNamespace bool Client corev1client.CoreV1Interface DryRunStrategy cmdutil.DryRunStrategy ValidationDirective string genericiooptions.IOStreams }
CreateSecretTLSOptions holds the options for 'create secret tls' sub command
func NewSecretTLSOptions ¶ added in v0.21.0
func NewSecretTLSOptions(ioStrems genericiooptions.IOStreams) *CreateSecretTLSOptions
NewSecretTLSOptions creates a new *CreateSecretTLSOptions with default value
func (*CreateSecretTLSOptions) Complete ¶ added in v0.21.0
func (o *CreateSecretTLSOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
Complete loads data from the command line environment
func (*CreateSecretTLSOptions) Run ¶ added in v0.21.0
func (o *CreateSecretTLSOptions) Run() error
Run calls createSecretTLS which will create secretTLS based on CreateSecretTLSOptions and makes an API call to the server
func (*CreateSecretTLSOptions) Validate ¶ added in v0.21.0
func (o *CreateSecretTLSOptions) Validate() error
Validate checks if CreateSecretTLSOptions hass sufficient value to run
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 CreateAnnotation bool FieldManager string ValidationDirective string Namespace string EnforceNamespace bool Mapper meta.RESTMapper DynamicClient dynamic.Interface PrintObj printers.ResourcePrinterFunc genericiooptions.IOStreams }
CreateSubcommandOptions is an options struct to support create subcommands
func NewCreateSubcommandOptions ¶
func NewCreateSubcommandOptions(ioStreams genericiooptions.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
type DockerConfig ¶ added in v0.21.0
type DockerConfig map[string]DockerConfigEntry
DockerConfig represents the config file used by the docker CLI. This config that represents the credentials that should be used when pulling images from specific image repositories.
type DockerConfigEntry ¶ added in v0.21.0
type DockerConfigEntry struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty" datapolicy:"password"` Email string `json:"email,omitempty"` Auth string `json:"auth,omitempty" datapolicy:"token"` }
DockerConfigEntry holds the user information that grant the access to docker registry
type DockerConfigJSON ¶ added in v0.21.0
type DockerConfigJSON struct { Auths DockerConfig `json:"auths" datapolicy:"token"` // +optional HttpHeaders map[string]string `json:"HttpHeaders,omitempty" datapolicy:"token"` }
DockerConfigJSON represents a local docker auth config file for pulling images.
type NamespaceOptions ¶ added in v0.21.0
type NamespaceOptions struct { // PrintFlags holds options necessary for obtaining a printer PrintFlags *genericclioptions.PrintFlags // Name of resource being created Name string DryRunStrategy cmdutil.DryRunStrategy ValidationDirective string CreateAnnotation bool FieldManager string Client *coreclient.CoreV1Client PrintObj func(obj runtime.Object) error genericiooptions.IOStreams }
NamespaceOptions is the options for 'create namespace' sub command
func NewNamespaceOptions ¶ added in v0.21.0
func NewNamespaceOptions(ioStreams genericiooptions.IOStreams) *NamespaceOptions
NewNamespaceOptions creates a new *NamespaceOptions with sane defaults
func (*NamespaceOptions) Run ¶ added in v0.21.0
func (o *NamespaceOptions) Run() error
Run calls the CreateSubcommandOptions.Run in NamespaceOpts instance
func (*NamespaceOptions) Validate ¶ added in v0.21.0
func (o *NamespaceOptions) Validate() error
Validate validates required fields are set to support structured generation
type PodDisruptionBudgetOpts ¶
type PodDisruptionBudgetOpts struct { // PrintFlags holds options necessary for obtaining a printer PrintFlags *genericclioptions.PrintFlags PrintObj func(obj runtime.Object) error // Name of resource being created Name string MinAvailable string // A label selector to use for this budget Selector string CreateAnnotation bool FieldManager string Namespace string EnforceNamespace bool Client *policyv1client.PolicyV1Client DryRunStrategy cmdutil.DryRunStrategy ValidationDirective string genericiooptions.IOStreams }
PodDisruptionBudgetOpts holds the command-line options for poddisruptionbudget sub command
func NewPodDisruptionBudgetOpts ¶ added in v0.21.0
func NewPodDisruptionBudgetOpts(ioStreams genericiooptions.IOStreams) *PodDisruptionBudgetOpts
NewPodDisruptionBudgetOpts creates a new *PodDisruptionBudgetOpts with sane defaults
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
func (*PodDisruptionBudgetOpts) Validate ¶ added in v0.21.0
func (o *PodDisruptionBudgetOpts) Validate() error
Validate checks to the PodDisruptionBudgetOpts to see if there is sufficient information run the 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 ValidationDirective string genericiooptions.IOStreams }
PriorityClassOptions holds the options for 'create priorityclass' sub command
func NewPriorityClassOptions ¶ added in v0.20.0
func NewPriorityClassOptions(ioStreams genericiooptions.IOStreams) *PriorityClassOptions
NewPriorityClassOptions returns an initialized PriorityClassOptions instance
func (*PriorityClassOptions) Complete ¶ added in v0.20.0
Complete completes all the required options
func (*PriorityClassOptions) Run ¶ added in v0.20.0
func (o *PriorityClassOptions) Run() error
Run calls the CreateSubcommandOptions.Run in the PriorityClassOptions instance
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 ValidationDirective string genericiooptions.IOStreams }
QuotaOpts holds the command-line options for 'create quota' sub command
func NewQuotaOpts ¶ added in v0.20.0
func NewQuotaOpts(ioStreams genericiooptions.IOStreams) *QuotaOpts
NewQuotaOpts creates a new *QuotaOpts with sane defaults
type ResourceOptions ¶
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 ValidationDirective string genericiooptions.IOStreams }
RoleBindingOptions holds the options for 'create rolebinding' sub command
func NewRoleBindingOptions ¶ added in v0.20.0
func NewRoleBindingOptions(ioStreams genericiooptions.IOStreams) *RoleBindingOptions
NewRoleBindingOptions creates a new *RoleBindingOptions with sane defaults
func (*RoleBindingOptions) Run ¶ added in v0.20.0
func (o *RoleBindingOptions) Run() error
Run performs the execution of 'create rolebinding' sub command
func (*RoleBindingOptions) Validate ¶ added in v0.20.0
func (o *RoleBindingOptions) Validate() error
Validate validates required fields are set
type ServiceAccountOpts ¶
type ServiceAccountOpts struct { // PrintFlags holds options necessary for obtaining a printer PrintFlags *genericclioptions.PrintFlags PrintObj func(obj runtime.Object) error // Name of resource being created Name string DryRunStrategy cmdutil.DryRunStrategy ValidationDirective string CreateAnnotation bool FieldManager string Namespace string EnforceNamespace bool Mapper meta.RESTMapper Client *coreclient.CoreV1Client genericiooptions.IOStreams }
ServiceAccountOpts holds the options for 'create serviceaccount' sub command
func NewServiceAccountOpts ¶ added in v0.21.0
func NewServiceAccountOpts(ioStreams genericiooptions.IOStreams) *ServiceAccountOpts
NewServiceAccountOpts creates a new *ServiceAccountOpts with sane defaults
func (*ServiceAccountOpts) Run ¶
func (o *ServiceAccountOpts) Run() error
Run makes the api call to the server
func (*ServiceAccountOpts) Validate ¶ added in v0.21.0
func (o *ServiceAccountOpts) Validate() error
Validate checks ServiceAccountOpts to see if there is sufficient information run the 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 EnforceNamespace bool Client corev1client.CoreV1Interface DryRunStrategy cmdutil.DryRunStrategy ValidationDirective string genericiooptions.IOStreams }
ServiceOptions holds the options for 'create service' sub command
func NewServiceOptions ¶ added in v0.20.0
func NewServiceOptions(ioStreams genericiooptions.IOStreams, serviceType corev1.ServiceType) *ServiceOptions
NewServiceOptions creates a ServiceOptions struct
func (*ServiceOptions) Run ¶ added in v0.20.0
func (o *ServiceOptions) Run() error
Run the service command
func (*ServiceOptions) Validate ¶ added in v0.20.0
func (o *ServiceOptions) Validate() error
Validate if the options are valid
type TokenOptions ¶ added in v0.24.0
type TokenOptions struct { // PrintFlags holds options necessary for obtaining a printer PrintFlags *genericclioptions.PrintFlags PrintObj func(obj runtime.Object) error // Name and namespace of service account to create a token for Name string Namespace string // BoundObjectKind is the kind of object to bind the token to. Optional. Can be Pod or Secret. BoundObjectKind string // BoundObjectName is the name of the object to bind the token to. Required if BoundObjectKind is set. BoundObjectName string // BoundObjectUID is the uid of the object to bind the token to. If unset, defaults to the current uid of the bound object. BoundObjectUID string // Audiences indicate the valid audiences for the requested token. If unset, defaults to the Kubernetes API server audiences. Audiences []string // Duration is the requested token lifetime. Optional. Duration time.Duration // CoreClient is the API client used to request the token. Required. CoreClient corev1client.CoreV1Interface // IOStreams are the output streams for the operation. Required. genericiooptions.IOStreams }
TokenOptions is the data required to perform a token request operation.
func NewTokenOpts ¶ added in v0.24.0
func NewTokenOpts(ioStreams genericiooptions.IOStreams) *TokenOptions
func (*TokenOptions) Validate ¶ added in v0.24.0
func (o *TokenOptions) Validate() error
Validate makes sure provided values for TokenOptions are valid
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_secret_docker.go
- create_secret_tls.go
- create_service.go
- create_serviceaccount.go
- create_token.go