Documentation
¶
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
- type ImageOptions
- type Patch
- type ResourcesOptions
- type SelectorOptions
- type SubjectOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculatePatch ¶ added in v1.6.0
func CalculatePatch(patch *Patch, encoder runtime.Encoder, mutateFn patchFn) bool
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 ¶ added in v1.8.0
func NewCmdEnv(f cmdutil.Factory, in io.Reader, out, errout io.Writer) *cobra.Command
NewCmdEnv implements the OpenShift cli env command
func NewCmdImage ¶
func NewCmdImage(f cmdutil.Factory, out, err io.Writer) *cobra.Command
func NewCmdResources ¶ added in v1.5.0
func NewCmdResources(f cmdutil.Factory, out io.Writer, errOut io.Writer) *cobra.Command
func NewCmdSelector ¶ added in v1.6.0
func NewCmdSelector(f cmdutil.Factory, out io.Writer) *cobra.Command
NewCmdSelector is the "set selector" command.
func NewCmdServiceAccount ¶ added in v1.8.0
func NewCmdServiceAccount(f cmdutil.Factory, out, err io.Writer) *cobra.Command
NewCmdServiceAccount returns the "set serviceaccount" command.
func NewCmdSubject ¶ added in v1.7.0
func NewCmdSubject(f cmdutil.Factory, out io.Writer, errOut io.Writer) *cobra.Command
Types ¶
type EnvOptions ¶ added in v1.8.0
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
Builder *resource.Builder
Infos []*resource.Info
Encoder runtime.Encoder
Cmd *cobra.Command
UpdatePodSpecForObject func(obj runtime.Object, fn func(*v1.PodSpec) error) (bool, error)
PrintObject func(cmd *cobra.Command, isLocal bool, mapper meta.RESTMapper, obj runtime.Object, out io.Writer) error
}
type ImageOptions ¶
type ImageOptions struct {
resource.FilenameOptions
Mapper meta.RESTMapper
Infos []*resource.Info
Encoder runtime.Encoder
Decoder runtime.Decoder
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)
PrintSuccess func(mapper meta.RESTMapper, shortOutput bool, out io.Writer, resource, name string, dryRun bool, operation string)
PrintObject func(cmd *cobra.Command, isLocal bool, mapper meta.RESTMapper, obj runtime.Object, out io.Writer) error
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()
type Patch ¶
type Patch struct {
Info *resource.Info
Err error
Before []byte
After []byte
Patch []byte
}
Patch represents the result of a mutation to an object.
func CalculatePatches ¶
func CalculatePatches(infos []*resource.Info, encoder runtime.Encoder, mutateFn patchFn) []*Patch
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 ¶ added in v1.5.0
type ResourcesOptions struct {
resource.FilenameOptions
Mapper meta.RESTMapper
Infos []*resource.Info
Encoder runtime.Encoder
Out io.Writer
Err io.Writer
Selector string
ContainerSelector string
Output string
All bool
Record bool
ChangeCause string
Local bool
Cmd *cobra.Command
Limits string
Requests string
ResourceRequirements v1.ResourceRequirements
PrintSuccess func(mapper meta.RESTMapper, shortOutput bool, out io.Writer, resource, name string, dryRun bool, operation string)
PrintObject func(cmd *cobra.Command, isLocal bool, mapper meta.RESTMapper, obj runtime.Object, out io.Writer) error
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
type SelectorOptions ¶ added in v1.6.0
type SelectorOptions struct {
PrintSuccess func(mapper meta.RESTMapper, shortOutput bool, out io.Writer, resource, name string, dryRun bool, operation string)
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 ¶ added in v1.6.0
func (o *SelectorOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
Complete assigns the SelectorOptions from args.
func (*SelectorOptions) RunSelector ¶ added in v1.6.0
func (o *SelectorOptions) RunSelector() error
RunSelector executes the command.
type SubjectOptions ¶ added in v1.7.0
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
Output string
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 ¶ added in v1.7.0
func (o *SubjectOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error