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, err 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, err 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 (o *EnvOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *EnvOptions) RunEnv(f cmdutil.Factory) error
- type ImageOptions
- func (o *ImageOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *ImageOptions) Run() error
- func (o *ImageOptions) Validate() error
- type Patch
- type ResourcesOptions
- func (o *ResourcesOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *ResourcesOptions) Run() error
- func (o *ResourcesOptions) Validate() error
- type SelectorOptions
- func (o *SelectorOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *SelectorOptions) RunSelector() error
- func (o *SelectorOptions) Validate() 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 { Out io.Writer Err io.Writer In io.Reader resource.FilenameOptions EnvParams []string EnvArgs []string Resources []string All bool Resolve bool List bool ShortOutput bool Local bool Overwrite bool DryRun bool ResourceVersion string ContainerSelector string Selector string Output string From string Prefix string Mapper meta.RESTMapper Typer runtime.ObjectTyper Builder *resource.Builder Infos []*resource.Info Encoder runtime.Encoder Cmd *cobra.Command UpdatePodSpecForObject func(obj runtime.Object, fn func(*api.PodSpec) error) (bool, error) PrintObject func(cmd *cobra.Command, isLocal bool, mapper meta.RESTMapper, obj runtime.Object, out io.Writer) error }
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 ImageOptions ¶
type ImageOptions struct { resource.FilenameOptions Mapper meta.RESTMapper Typer runtime.ObjectTyper Infos []*resource.Info Encoder runtime.Encoder Selector string Out io.Writer Err io.Writer DryRun bool ShortOutput bool All bool Record bool Output string ChangeCause string Local bool Cmd *cobra.Command ResolveImage func(in string) (string, error) PrintObject func(cmd *cobra.Command, isLocal bool, mapper meta.RESTMapper, obj runtime.Object, out io.Writer) error UpdatePodSpecForObject func(obj runtime.Object, fn func(*api.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 (*ImageOptions) Complete ¶
func (*ImageOptions) Run ¶
func (o *ImageOptions) Run() error
func (*ImageOptions) Validate ¶
func (o *ImageOptions) Validate() error
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 ResourcesOptions ¶
type ResourcesOptions struct { resource.FilenameOptions Mapper meta.RESTMapper Typer runtime.ObjectTyper Infos []*resource.Info Encoder runtime.Encoder Out io.Writer Err io.Writer Selector string ContainerSelector string ShortOutput bool All bool Record bool ChangeCause string Local bool Cmd *cobra.Command Limits string Requests string ResourceRequirements api.ResourceRequirements PrintObject func(cmd *cobra.Command, isLocal bool, mapper meta.RESTMapper, obj runtime.Object, out io.Writer) error UpdatePodSpecForObject func(obj runtime.Object, fn func(*api.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 (*ResourcesOptions) Complete ¶
func (*ResourcesOptions) Run ¶
func (o *ResourcesOptions) Run() error
func (*ResourcesOptions) Validate ¶
func (o *ResourcesOptions) Validate() error
type SelectorOptions ¶
type SelectorOptions struct { PrintObject func(obj runtime.Object) error ClientForMapping func(mapping *meta.RESTMapping) (resource.RESTClient, error) // 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 (*SelectorOptions) Complete ¶
Complete assigns the SelectorOptions from args.
func (*SelectorOptions) RunSelector ¶
func (o *SelectorOptions) RunSelector() error
RunSelector executes the command.
func (*SelectorOptions) Validate ¶
func (o *SelectorOptions) Validate() error
Validate basic inputs
type SubjectOptions ¶
type SubjectOptions struct { resource.FilenameOptions Mapper meta.RESTMapper Typer runtime.ObjectTyper Infos []*resource.Info Encoder runtime.Encoder Out io.Writer Err io.Writer Selector string ContainerSelector string ShortOutput bool All bool DryRun bool Local bool Users []string Groups []string ServiceAccounts []string PrintObject func(mapper meta.RESTMapper, obj runtime.Object, out io.Writer) error }
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.8.2
- Published
- Oct 24, 2017
- Platform
- js/wasm
- Imports
- 24 packages
- Last checked
- 41 seconds ago –
Tools for package owners.