package set
import "k8s.io/kubernetes/pkg/kubectl/cmd/set"
Index ¶
- func CalculatePatch(patch *Patch, encoder runtime.Encoder, mutateFn patchFn) bool
- func NewCmdEnv(f cmdutil.Factory, in io.Reader, out, errout io.Writer) *cobra.Command
- func NewCmdImage(f cmdutil.Factory, out, errOut io.Writer) *cobra.Command
- func NewCmdResources(f cmdutil.Factory, out io.Writer, errOut io.Writer) *cobra.Command
- func NewCmdSelector(f cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdServiceAccount(f cmdutil.Factory, out, errOut io.Writer) *cobra.Command
- func NewCmdSet(f cmdutil.Factory, in io.Reader, out, err io.Writer) *cobra.Command
- func NewCmdSubject(f cmdutil.Factory, out io.Writer, errOut io.Writer) *cobra.Command
- type EnvOptions
- func NewEnvOptions(in io.Reader, out, errout io.Writer) *EnvOptions
- func (o *EnvOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *EnvOptions) RunEnv(f cmdutil.Factory) error
- type Patch
- type SetImageOptions
- func NewImageOptions(out, errOut io.Writer) *SetImageOptions
- func (o *SetImageOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *SetImageOptions) Run() error
- func (o *SetImageOptions) Validate() error
- type SetResourcesOptions
- func NewResourcesOptions(out io.Writer, errOut io.Writer) *SetResourcesOptions
- func (o *SetResourcesOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *SetResourcesOptions) Run() error
- func (o *SetResourcesOptions) Validate() error
- type SetSelectorOptions
- func NewSelectorOptions(out io.Writer) *SetSelectorOptions
- func (o *SetSelectorOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *SetSelectorOptions) RunSelector() error
- func (o *SetSelectorOptions) Validate() error
- type SetServiceAccountOptions
- func NewSetServiceAccountOptions(out, errOut io.Writer) *SetServiceAccountOptions
- func (o *SetServiceAccountOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *SetServiceAccountOptions) Run() error
- type SubjectOptions
Functions ¶
func CalculatePatch ¶
CalculatePatch calls the mutation function on the provided info object, and generates a strategic merge patch for the changes in the object. Encoder must be able to encode the info into the appropriate destination type. This function returns whether the mutation function made any change in the original object.
func NewCmdEnv ¶
NewCmdEnv implements the OpenShift cli env command
func NewCmdImage ¶
func NewCmdResources ¶
func NewCmdSelector ¶
NewCmdSelector is the "set selector" command.
func NewCmdServiceAccount ¶
NewCmdServiceAccount returns the "set serviceaccount" command.
func NewCmdSet ¶
func NewCmdSubject ¶
Types ¶
type EnvOptions ¶
type EnvOptions struct { PrintFlags *printers.PrintFlags Out io.Writer Err io.Writer In io.Reader resource.FilenameOptions EnvParams []string EnvArgs []string Resources []string All bool Resolve bool List bool Local bool Overwrite bool DryRun bool ResourceVersion string ContainerSelector string Selector string Output string From string Prefix string PrintObj printers.ResourcePrinterFunc Builder *resource.Builder Infos []*resource.Info Cmd *cobra.Command UpdatePodSpecForObject func(obj runtime.Object, fn func(*v1.PodSpec) error) (bool, error) }
func NewEnvOptions ¶
func NewEnvOptions(in io.Reader, out, errout io.Writer) *EnvOptions
NewEnvOptions returns an EnvOptions indicating all containers in the selected pod templates are selected by default and allowing environment to be overwritten
func (*EnvOptions) Complete ¶
func (*EnvOptions) RunEnv ¶
func (o *EnvOptions) RunEnv(f cmdutil.Factory) error
RunEnv contains all the necessary functionality for the OpenShift cli env command
type Patch ¶
Patch represents the result of a mutation to an object.
func CalculatePatches ¶
CalculatePatches calculates patches on each provided info object. If the provided mutateFn makes no change in an object, the object is not included in the final list of patches.
type SetImageOptions ¶
type SetImageOptions struct { resource.FilenameOptions PrintFlags *printers.PrintFlags RecordFlags *genericclioptions.RecordFlags Infos []*resource.Info Selector string Out io.Writer Err io.Writer DryRun bool All bool Output string ChangeCause string Local bool Cmd *cobra.Command ResolveImage func(in string) (string, error) PrintObj printers.ResourcePrinterFunc Recorder genericclioptions.Recorder UpdatePodSpecForObject func(obj runtime.Object, fn func(*v1.PodSpec) error) (bool, error) Resources []string ContainerImages map[string]string }
ImageOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
func NewImageOptions ¶
func NewImageOptions(out, errOut io.Writer) *SetImageOptions
func (*SetImageOptions) Complete ¶
func (*SetImageOptions) Run ¶
func (o *SetImageOptions) Run() error
func (*SetImageOptions) Validate ¶
func (o *SetImageOptions) Validate() error
type SetResourcesOptions ¶
type SetResourcesOptions struct { resource.FilenameOptions PrintFlags *printers.PrintFlags RecordFlags *genericclioptions.RecordFlags Infos []*resource.Info Out io.Writer Err io.Writer Selector string ContainerSelector string Output string All bool ChangeCause string Local bool Cmd *cobra.Command DryRun bool PrintObj printers.ResourcePrinterFunc Recorder genericclioptions.Recorder Limits string Requests string ResourceRequirements v1.ResourceRequirements UpdatePodSpecForObject func(obj runtime.Object, fn func(*v1.PodSpec) error) (bool, error) Resources []string }
ResourcesOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags
func NewResourcesOptions ¶
func NewResourcesOptions(out io.Writer, errOut io.Writer) *SetResourcesOptions
NewResourcesOptions returns a ResourcesOptions indicating all containers in the selected pod templates are selected by default.
func (*SetResourcesOptions) Complete ¶
func (*SetResourcesOptions) Run ¶
func (o *SetResourcesOptions) Run() error
func (*SetResourcesOptions) Validate ¶
func (o *SetResourcesOptions) Validate() error
type SetSelectorOptions ¶
type SetSelectorOptions struct { PrintFlags *printers.PrintFlags RecordFlags *genericclioptions.RecordFlags ClientForMapping func(mapping *meta.RESTMapping) (resource.RESTClient, error) PrintObj printers.ResourcePrinterFunc Recorder genericclioptions.Recorder // contains filtered or unexported fields }
SelectorOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
func NewSelectorOptions ¶
func NewSelectorOptions(out io.Writer) *SetSelectorOptions
func (*SetSelectorOptions) Complete ¶
Complete assigns the SelectorOptions from args.
func (*SetSelectorOptions) RunSelector ¶
func (o *SetSelectorOptions) RunSelector() error
RunSelector executes the command.
func (*SetSelectorOptions) Validate ¶
func (o *SetSelectorOptions) Validate() error
Validate basic inputs
type SetServiceAccountOptions ¶
type SetServiceAccountOptions struct { PrintFlags *printers.PrintFlags RecordFlags *genericclioptions.RecordFlags PrintObj printers.ResourcePrinterFunc Recorder genericclioptions.Recorder // contains filtered or unexported fields }
serviceAccountConfig encapsulates the data required to perform the operation.
func NewSetServiceAccountOptions ¶
func NewSetServiceAccountOptions(out, errOut io.Writer) *SetServiceAccountOptions
func (*SetServiceAccountOptions) Complete ¶
func (o *SetServiceAccountOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
Complete configures serviceAccountConfig from command line args.
func (*SetServiceAccountOptions) Run ¶
func (o *SetServiceAccountOptions) Run() error
Run creates and applies the patch either locally or calling apiserver.
type SubjectOptions ¶
type SubjectOptions struct { PrintFlags *printers.PrintFlags resource.FilenameOptions Infos []*resource.Info Out io.Writer Err io.Writer Selector string ContainerSelector string Output string All bool DryRun bool Local bool Users []string Groups []string ServiceAccounts []string PrintObj printers.ResourcePrinterFunc }
SubjectOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags
func (*SubjectOptions) Complete ¶
func (*SubjectOptions) Run ¶
func (o *SubjectOptions) Run(f cmdutil.Factory, fn updateSubjects) error
func (*SubjectOptions) Validate ¶
func (o *SubjectOptions) Validate() error
Source Files ¶
helper.go set.go set_env.go set_image.go set_resources.go set_selector.go set_serviceaccount.go set_subject.go
- Version
- v1.11.0-alpha.1
- Published
- Apr 19, 2018
- Platform
- windows/amd64
- Imports
- 28 packages
- Last checked
- 1 hour ago –
Tools for package owners.