set

package
v1.11.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2018 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

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, streams genericclioptions.IOStreams) *cobra.Command

NewCmdEnv implements the OpenShift cli env command

func NewCmdImage

func NewCmdImage(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

func NewCmdResources added in v1.5.0

func NewCmdResources(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

func NewCmdSelector added in v1.6.0

func NewCmdSelector(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdSelector is the "set selector" command.

func NewCmdServiceAccount added in v1.8.0

func NewCmdServiceAccount(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdServiceAccount returns the "set serviceaccount" command.

func NewCmdSet

func NewCmdSet(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

func NewCmdSubject added in v1.7.0

func NewCmdSubject(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.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
}

func NewEnvOptions added in v1.11.0

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) Complete added in v1.8.0

func (o *EnvOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error

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.0

func (o *EnvOptions) Validate() error

type ImageResolver added in v1.11.0

type ImageResolver func(in string) (string, error)

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 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 PatchFn added in v1.11.0

type PatchFn func(runtime.Object) ([]byte, error)

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.0

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.0

func NewImageOptions(streams genericclioptions.IOStreams) *SetImageOptions

func (*SetImageOptions) Complete added in v1.11.0

func (o *SetImageOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error

func (*SetImageOptions) Run added in v1.11.0

func (o *SetImageOptions) Run() error

func (*SetImageOptions) Validate added in v1.11.0

func (o *SetImageOptions) Validate() error

type SetResourcesOptions added in v1.11.0

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
}

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 added in v1.11.0

func NewResourcesOptions(streams genericclioptions.IOStreams) *SetResourcesOptions

NewResourcesOptions returns a ResourcesOptions indicating all containers in the selected pod templates are selected by default.

func (*SetResourcesOptions) Complete added in v1.11.0

func (o *SetResourcesOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error

func (*SetResourcesOptions) Run added in v1.11.0

func (o *SetResourcesOptions) Run() error

func (*SetResourcesOptions) Validate added in v1.11.0

func (o *SetResourcesOptions) Validate() error

type SetSelectorOptions added in v1.11.0

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
}

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 added in v1.11.0

func NewSelectorOptions(streams genericclioptions.IOStreams) *SetSelectorOptions

func (*SetSelectorOptions) Complete added in v1.11.0

func (o *SetSelectorOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error

Complete assigns the SelectorOptions from args.

func (*SetSelectorOptions) RunSelector added in v1.11.0

func (o *SetSelectorOptions) RunSelector() error

RunSelector executes the command.

func (*SetSelectorOptions) Validate added in v1.11.0

func (o *SetSelectorOptions) Validate() error

Validate basic inputs

type SetServiceAccountOptions added in v1.11.0

type SetServiceAccountOptions struct {
	PrintFlags  *genericclioptions.PrintFlags
	RecordFlags *genericclioptions.RecordFlags

	PrintObj printers.ResourcePrinterFunc
	Recorder genericclioptions.Recorder

	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

serviceAccountConfig encapsulates the data required to perform the operation.

func NewSetServiceAccountOptions added in v1.11.0

func NewSetServiceAccountOptions(streams genericclioptions.IOStreams) *SetServiceAccountOptions

func (*SetServiceAccountOptions) Complete added in v1.11.0

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.0

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.0

func NewSubjectOptions(streams genericclioptions.IOStreams) *SubjectOptions

func (*SubjectOptions) Complete added in v1.7.0

func (o *SubjectOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error

func (*SubjectOptions) Run added in v1.7.0

func (o *SubjectOptions) Run(fn updateSubjects) error

func (*SubjectOptions) Validate added in v1.7.0

func (o *SubjectOptions) Validate() error

Directories

Path Synopsis
Package env provides functions to incorporate environment variables into set env.
Package env provides functions to incorporate environment variables into set env.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL