applier

package
v0.0.0-...-842e221 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Applier

type Applier interface {
	Apply(ctx context.Context, options ApplierOptions) error
}

func NewDirectApplier

func NewDirectApplier() Applier

type ApplierOptions

type ApplierOptions struct {
	Objects []*manifest.Object

	RESTConfig *rest.Config
	RESTMapper meta.RESTMapper
	Namespace  string
	Validate   bool

	CascadingStrategy metav1.DeletionPropagation

	PruneWhitelist []string
	Prune          bool

	// Force is set if we should "force" the apply.
	// For server-side-apply, this corresponds to setting the force option, which ensures we take ownership
	// even when another field manager owns a field.
	Force bool

	// ExtraArgs holds additional arguments that should be passed to kubectl.
	// @deprecated: prefer using explicit arguments (Force etc)
	ExtraArgs []string
}

type ApplySetApplier

type ApplySetApplier struct {
	// contains filtered or unexported fields
}

func NewApplySetApplier

func NewApplySetApplier(patchOptions metav1.PatchOptions) *ApplySetApplier

func (*ApplySetApplier) Apply

func (a *ApplySetApplier) Apply(ctx context.Context, opt ApplierOptions) error

type DirectApplier

type DirectApplier struct {
	// contains filtered or unexported fields
}

func (*DirectApplier) Apply

func (d *DirectApplier) Apply(ctx context.Context, opt ApplierOptions) error

type ExecKubectl

type ExecKubectl struct {
	// contains filtered or unexported fields
}

ExecKubectl provides an interface to kubectl

func NewExec

func NewExec() *ExecKubectl

New creates a Client that runs kubectl avaliable on the path

func (*ExecKubectl) Apply

func (c *ExecKubectl) Apply(ctx context.Context, opt ApplierOptions) error

Apply runs the kubectl apply with the provided manifest argument

Jump to

Keyboard shortcuts

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