Documentation ¶
Index ¶
- func CalculatePatch(patch *Patch, encoder runtime.Encoder, mutateFn PatchFn) bool
- func NewCmdEnv(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdImage(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdResources(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdSelector(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdServiceAccount(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdSet(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdSubject(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- type EnvOptions
- type ImageResolver
- type Patch
- type PatchFn
- type SetImageOptions
- type SetResourcesOptions
- type SetSelectorOptions
- type SetServiceAccountOptions
- type SubjectOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculatePatch ¶ added in v1.6.0
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 NewCmdImage ¶
NewCmdImage returns an initialized Command instance for the 'set image' sub command
func NewCmdResources ¶ added in v1.5.0
NewCmdResources returns initialized Command instance for the 'set resources' sub command
func NewCmdSelector ¶ added in v1.6.0
NewCmdSelector is the "set selector" command.
func NewCmdServiceAccount ¶ added in v1.8.0
NewCmdServiceAccount returns the "set serviceaccount" command.
func NewCmdSubject ¶ added in v1.7.0
NewCmdSubject returns the "new subject" sub command
Types ¶
type EnvOptions ¶ added in v1.8.0
type EnvOptions struct { PrintFlags *genericclioptions.PrintFlags resource.FilenameOptions EnvParams []string All bool Resolve bool List bool Local bool Overwrite bool ContainerSelector string Selector string From string Prefix string Keys []string PrintObj printers.ResourcePrinterFunc genericclioptions.IOStreams // contains filtered or unexported fields }
EnvOptions holds values for 'set env' command-lone options
func NewEnvOptions ¶ added in v1.11.2
func NewEnvOptions(streams genericclioptions.IOStreams) *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) RunEnv ¶ added in v1.8.0
func (o *EnvOptions) RunEnv() error
RunEnv contains all the necessary functionality for the OpenShift cli env command
func (*EnvOptions) Validate ¶ added in v1.11.2
func (o *EnvOptions) Validate() error
Validate makes sure provided values for EnvOptions are valid
type ImageResolver ¶ added in v1.11.2
ImageResolver is a func that receives an image name, and resolves it to an appropriate / compatible image name. Adds flexibility for future image resolving methods.
type PatchFn ¶ added in v1.11.2
PatchFn is a function type that accepts an info object and returns a byte slice. Implementations of PatchFn should update the object and return it encoded.
type SetImageOptions ¶ added in v1.11.2
type SetImageOptions struct { resource.FilenameOptions PrintFlags *genericclioptions.PrintFlags RecordFlags *genericclioptions.RecordFlags Infos []*resource.Info Selector string DryRun bool All bool Output string Local bool ResolveImage ImageResolver PrintObj printers.ResourcePrinterFunc Recorder genericclioptions.Recorder UpdatePodSpecForObject polymorphichelpers.UpdatePodSpecForObjectFunc Resources []string ContainerImages map[string]string genericclioptions.IOStreams }
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 ¶ added in v1.11.2
func NewImageOptions(streams genericclioptions.IOStreams) *SetImageOptions
NewImageOptions returns an initialized SetImageOptions instance
func (*SetImageOptions) Run ¶ added in v1.11.2
func (o *SetImageOptions) Run() error
Run performs the execution of 'set image' sub command
func (*SetImageOptions) Validate ¶ added in v1.11.2
func (o *SetImageOptions) Validate() error
Validate makes sure provided values in SetImageOptions are valid
type SetResourcesOptions ¶ added in v1.11.2
type SetResourcesOptions struct { resource.FilenameOptions PrintFlags *genericclioptions.PrintFlags RecordFlags *genericclioptions.RecordFlags Infos []*resource.Info Selector string ContainerSelector string Output string All bool Local bool DryRun bool PrintObj printers.ResourcePrinterFunc Recorder genericclioptions.Recorder Limits string Requests string ResourceRequirements v1.ResourceRequirements UpdatePodSpecForObject polymorphichelpers.UpdatePodSpecForObjectFunc Resources []string genericclioptions.IOStreams }
SetResourcesOptions 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 ¶ added in v1.11.2
func NewResourcesOptions(streams genericclioptions.IOStreams) *SetResourcesOptions
NewResourcesOptions returns a ResourcesOptions indicating all containers in the selected pod templates are selected by default.
func (*SetResourcesOptions) Run ¶ added in v1.11.2
func (o *SetResourcesOptions) Run() error
Run performs the execution of 'set resources' sub command
func (*SetResourcesOptions) Validate ¶ added in v1.11.2
func (o *SetResourcesOptions) Validate() error
Validate makes sure that provided values in ResourcesOptions are valid
type SetSelectorOptions ¶ added in v1.11.2
type SetSelectorOptions struct { // Bound ResourceBuilderFlags *genericclioptions.ResourceBuilderFlags PrintFlags *genericclioptions.PrintFlags RecordFlags *genericclioptions.RecordFlags // computed WriteToServer bool PrintObj printers.ResourcePrinterFunc Recorder genericclioptions.Recorder ResourceFinder genericclioptions.ResourceFinder // set at initialization genericclioptions.IOStreams // contains filtered or unexported fields }
SetSelectorOptions 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 ¶ added in v1.11.2
func NewSelectorOptions(streams genericclioptions.IOStreams) *SetSelectorOptions
NewSelectorOptions returns an initialized SelectorOptions instance
func (*SetSelectorOptions) Complete ¶ added in v1.11.2
Complete assigns the SelectorOptions from args.
func (*SetSelectorOptions) RunSelector ¶ added in v1.11.2
func (o *SetSelectorOptions) RunSelector() error
RunSelector executes the command.
func (*SetSelectorOptions) Validate ¶ added in v1.11.2
func (o *SetSelectorOptions) Validate() error
Validate basic inputs
type SetServiceAccountOptions ¶ added in v1.11.2
type SetServiceAccountOptions struct { PrintFlags *genericclioptions.PrintFlags RecordFlags *genericclioptions.RecordFlags PrintObj printers.ResourcePrinterFunc Recorder genericclioptions.Recorder genericclioptions.IOStreams // contains filtered or unexported fields }
SetServiceAccountOptions encapsulates the data required to perform the operation.
func NewSetServiceAccountOptions ¶ added in v1.11.2
func NewSetServiceAccountOptions(streams genericclioptions.IOStreams) *SetServiceAccountOptions
NewSetServiceAccountOptions returns an initialized SetServiceAccountOptions instance
func (*SetServiceAccountOptions) Complete ¶ added in v1.11.2
func (o *SetServiceAccountOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
Complete configures serviceAccountConfig from command line args.
func (*SetServiceAccountOptions) Run ¶ added in v1.11.2
func (o *SetServiceAccountOptions) Run() error
Run creates and applies the patch either locally or calling apiserver.
type SubjectOptions ¶ added in v1.7.0
type SubjectOptions struct { PrintFlags *genericclioptions.PrintFlags resource.FilenameOptions Infos []*resource.Info Selector string ContainerSelector string Output string All bool DryRun bool Local bool Users []string Groups []string ServiceAccounts []string PrintObj printers.ResourcePrinterFunc genericclioptions.IOStreams // contains filtered or unexported fields }
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 NewSubjectOptions ¶ added in v1.11.2
func NewSubjectOptions(streams genericclioptions.IOStreams) *SubjectOptions
NewSubjectOptions returns an initialized SubjectOptions instance
func (*SubjectOptions) Run ¶ added in v1.7.0
func (o *SubjectOptions) Run(fn updateSubjects) error
Run performs the execution of "set subject" sub command
func (*SubjectOptions) Validate ¶ added in v1.7.0
func (o *SubjectOptions) Validate() error
Validate makes sure provided values in SubjectOptions are valid