apply

package
v1.13.2-k3s3 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdApply

func NewCmdApply(baseName string, f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command

func NewCmdApplyEditLastApplied

func NewCmdApplyEditLastApplied(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command

func NewCmdApplySetLastApplied

func NewCmdApplySetLastApplied(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command

func NewCmdApplyViewLastApplied

func NewCmdApplyViewLastApplied(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command

Types

type ApplyOptions

type ApplyOptions struct {
	RecordFlags *genericclioptions.RecordFlags
	Recorder    genericclioptions.Recorder

	PrintFlags *genericclioptions.PrintFlags
	ToPrinter  func(string) (printers.ResourcePrinter, error)

	DeleteFlags   *delete.DeleteFlags
	DeleteOptions *delete.DeleteOptions

	Selector       string
	DryRun         bool
	ServerDryRun   bool
	Prune          bool
	PruneResources []pruneResource

	All                        bool
	Overwrite                  bool
	PruneWhitelist             []string
	ShouldIncludeUninitialized bool

	Validator       validation.Schema
	Builder         *resource.Builder
	Mapper          meta.RESTMapper
	DynamicClient   dynamic.Interface
	DiscoveryClient discovery.DiscoveryInterface

	Namespace        string
	EnforceNamespace bool

	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

func NewApplyOptions

func NewApplyOptions(ioStreams genericclioptions.IOStreams) *ApplyOptions

func (*ApplyOptions) Complete

func (o *ApplyOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error

func (*ApplyOptions) Run

func (o *ApplyOptions) Run() error

type DryRunVerifier

type DryRunVerifier struct {
	Finder cmdutil.CRDFinder
}

DryRunVerifier verifies if a given group-version-kind supports DryRun against the current server. Sending dryRun requests to apiserver that don't support it will result in objects being unwillingly persisted.

It reads the OpenAPI to see if the given GVK supports dryRun. If the GVK can not be found, we assume that CRDs will have the same level of support as "namespaces", and non-CRDs will not be supported. We delay the check for CRDs as much as possible though, since it requires an extra round-trip to the server.

func (*DryRunVerifier) HasSupport

func (v *DryRunVerifier) HasSupport(gvk schema.GroupVersionKind) error

HasSupport verifies if the given gvk supports DryRun. An error is returned if it doesn't.

type PatchBuffer

type PatchBuffer struct {
	Patch     []byte
	PatchType types.PatchType
}

type Patcher

type Patcher struct {
	Mapping       *meta.RESTMapping
	Helper        *resource.Helper
	DynamicClient dynamic.Interface

	Overwrite bool
	BackOff   clockwork.Clock

	Force        bool
	Cascade      bool
	Timeout      time.Duration
	GracePeriod  int
	ServerDryRun bool

	// If set, forces the patch against a specific resourceVersion
	ResourceVersion *string

	// Number of retries to make if the patch fails with conflict
	Retries int
}

func (*Patcher) Patch

func (p *Patcher) Patch(current runtime.Object, modified []byte, source, namespace, name string, errOut io.Writer) ([]byte, runtime.Object, error)

type SetLastAppliedOptions

type SetLastAppliedOptions struct {
	CreateAnnotation bool

	PrintFlags *genericclioptions.PrintFlags
	PrintObj   printers.ResourcePrinterFunc

	FilenameOptions resource.FilenameOptions

	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

func NewSetLastAppliedOptions

func NewSetLastAppliedOptions(ioStreams genericclioptions.IOStreams) *SetLastAppliedOptions

func (*SetLastAppliedOptions) Complete

func (o *SetLastAppliedOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error

func (*SetLastAppliedOptions) RunSetLastApplied

func (o *SetLastAppliedOptions) RunSetLastApplied() error

func (*SetLastAppliedOptions) Validate

func (o *SetLastAppliedOptions) Validate() error

type ViewLastAppliedOptions

type ViewLastAppliedOptions struct {
	FilenameOptions              resource.FilenameOptions
	Selector                     string
	LastAppliedConfigurationList []string
	OutputFormat                 string
	All                          bool
	Factory                      cmdutil.Factory

	genericclioptions.IOStreams
}

func NewViewLastAppliedOptions

func NewViewLastAppliedOptions(ioStreams genericclioptions.IOStreams) *ViewLastAppliedOptions

func (*ViewLastAppliedOptions) Complete

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

func (*ViewLastAppliedOptions) RunApplyViewLastApplied

func (o *ViewLastAppliedOptions) RunApplyViewLastApplied(cmd *cobra.Command) error

func (*ViewLastAppliedOptions) Validate

func (o *ViewLastAppliedOptions) Validate(cmd *cobra.Command) error

Jump to

Keyboard shortcuts

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