kubernetes: k8s.io/kubernetes/pkg/kubectl/cmd/apply Index | Files

package apply

import "k8s.io/kubernetes/pkg/kubectl/cmd/apply"

Index

Package Files

apply.go apply_edit_last_applied.go apply_set_last_applied.go apply_view_last_applied.go

func NewCmdApply Uses

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

NewCmdApply creates the `apply` command

func NewCmdApplyEditLastApplied Uses

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

NewCmdApplyEditLastApplied created the cobra CLI command for the `apply edit-last-applied` command.

func NewCmdApplySetLastApplied Uses

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

NewCmdApplySetLastApplied creates the cobra CLI `apply` subcommand `set-last-applied`.`

func NewCmdApplyViewLastApplied Uses

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

NewCmdApplyViewLastApplied creates the cobra CLI `apply` subcommand `view-last-applied`.`

type ApplyOptions Uses

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

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

    DeleteFlags   *delete.DeleteFlags
    DeleteOptions *delete.DeleteOptions

    ServerSideApply bool
    ForceConflicts  bool
    FieldManager    string
    Selector        string
    DryRun          bool
    ServerDryRun    bool
    Prune           bool
    PruneResources  []pruneResource

    All            bool
    Overwrite      bool
    OpenAPIPatch   bool
    PruneWhitelist []string

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

    Namespace        string
    EnforceNamespace bool

    genericclioptions.IOStreams
    // contains filtered or unexported fields
}

ApplyOptions defines flags and other configuration parameters for the `apply` command

func NewApplyOptions Uses

func NewApplyOptions(ioStreams genericclioptions.IOStreams) *ApplyOptions

NewApplyOptions creates new ApplyOptions for the `apply` command

func (*ApplyOptions) Complete Uses

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

Complete verifies if ApplyOptions are valid and without conflicts.

func (*ApplyOptions) Run Uses

func (o *ApplyOptions) Run() error

Run executes the `apply` command.

type DryRunVerifier Uses

type DryRunVerifier struct {
    Finder        cmdutil.CRDFinder
    OpenAPIGetter discovery.OpenAPISchemaInterface
}

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 Uses

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 Uses

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

PatchBuffer caches changes that are to be applied.

type Patcher Uses

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

    OpenapiSchema openapi.Resources
}

Patcher defines options to patch OpenAPI objects.

func (*Patcher) Patch Uses

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

Patch tries to patch an OpenAPI resource. On success, returns the merge patch as well the final patched object. On failure, returns an error.

type SetLastAppliedOptions Uses

type SetLastAppliedOptions struct {
    CreateAnnotation bool

    PrintFlags *genericclioptions.PrintFlags
    PrintObj   printers.ResourcePrinterFunc

    FilenameOptions resource.FilenameOptions

    genericclioptions.IOStreams
    // contains filtered or unexported fields
}

SetLastAppliedOptions defines options for the `apply set-last-applied` command.`

func NewSetLastAppliedOptions Uses

func NewSetLastAppliedOptions(ioStreams genericclioptions.IOStreams) *SetLastAppliedOptions

NewSetLastAppliedOptions takes option arguments from a CLI stream and returns it at SetLastAppliedOptions type.

func (*SetLastAppliedOptions) Complete Uses

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

Complete populates dry-run and output flag options.

func (*SetLastAppliedOptions) RunSetLastApplied Uses

func (o *SetLastAppliedOptions) RunSetLastApplied() error

RunSetLastApplied executes the `set-last-applied` command according to SetLastAppliedOptions.

func (*SetLastAppliedOptions) Validate Uses

func (o *SetLastAppliedOptions) Validate() error

Validate checks SetLastAppliedOptions for validity.

type ViewLastAppliedOptions Uses

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

    genericclioptions.IOStreams
}

ViewLastAppliedOptions defines options for the `apply view-last-applied` command.`

func NewViewLastAppliedOptions Uses

func NewViewLastAppliedOptions(ioStreams genericclioptions.IOStreams) *ViewLastAppliedOptions

NewViewLastAppliedOptions takes option arguments from a CLI stream and returns it at ViewLastAppliedOptions type.

func (*ViewLastAppliedOptions) Complete Uses

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

Complete checks an object for last-applied-configuration annotations.

func (*ViewLastAppliedOptions) RunApplyViewLastApplied Uses

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

RunApplyViewLastApplied executes the `view-last-applied` command according to ViewLastAppliedOptions.

func (*ViewLastAppliedOptions) Validate Uses

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

Validate checks ViewLastAppliedOptions for validity.

Package apply imports 39 packages (graph) and is imported by 21 packages. Updated 2019-07-21. Refresh now. Tools for package owners.