applier

package
v1.122.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cmd *exec.Cmd) ([]byte, []byte, error)

Types

type Kubectl

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

func (*Kubectl) Apply

func (c *Kubectl) Apply(targetNamespace string, slug string, yamlDoc []byte, dryRun bool, wait bool, annotateSlug bool) ([]byte, []byte, error)

func (*Kubectl) ApplyCreateOrPatch

func (c *Kubectl) ApplyCreateOrPatch(targetNamespace string, slug string, yamlDoc []byte, dryRun bool, wait bool, annotateSlug bool) ([]byte, []byte, error)

ApplyCreateOrPatch attempts to run a `kubectl apply` on the yaml document. If it fails it will try to split a multi-doc and try again. As a last resort it will try create and patch. It's important to use patch as a last resort because it can trigger load balancer services to redeploy with new nodeports (SC-41322) and will remove the continuity of kubectl apply metadata.

func (*Kubectl) Remove

func (c *Kubectl) Remove(targetNamespace string, yamlDoc []byte, wait bool) ([]byte, []byte, error)

type KubectlInterface added in v1.98.3

type KubectlInterface interface {
	Apply(targetNamespace string, slug string, yamlDoc []byte, dryRun bool, wait bool, annotateSlug bool) ([]byte, []byte, error)
	Remove(targetNamespace string, yamlDoc []byte, wait bool) ([]byte, []byte, error)
	ApplyCreateOrPatch(targetNamespace string, slug string, yamlDoc []byte, dryRun bool, wait bool, annotateSlug bool) ([]byte, []byte, error)
}

func NewKubectl

func NewKubectl(kubectl, kustomize string, config *rest.Config) KubectlInterface

Jump to

Keyboard shortcuts

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