kubectl

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	*pkgkubectl.CLI
	Flags latest.KubectlFlags

	ForceDeploy bool
	// contains filtered or unexported fields
}

CLI holds parameters to run kubectl.

func (*CLI) Apply added in v0.13.0

func (c *CLI) Apply(ctx context.Context, out io.Writer, manifests ManifestList) error

Apply runs `kubectl apply` on a list of manifests.

func (*CLI) Delete added in v0.13.0

func (c *CLI) Delete(ctx context.Context, out io.Writer, manifests ManifestList) error

Delete runs `kubectl delete` on a list of manifests.

func (*CLI) ReadManifests added in v0.22.0

func (c *CLI) ReadManifests(ctx context.Context, manifests []string) (ManifestList, error)

ReadManifests reads a list of manifests in yaml format.

type ManifestList added in v0.13.0

type ManifestList [][]byte

ManifestList is a list of yaml manifests.

func (*ManifestList) Append added in v0.13.0

func (l *ManifestList) Append(buf []byte)

Append appends the yaml manifests defined in the given buffer.

func (*ManifestList) Diff added in v0.13.0

func (l *ManifestList) Diff(latest ManifestList) ManifestList

Diff computes the list of manifests that have changed.

func (*ManifestList) Reader added in v0.13.0

func (l *ManifestList) Reader() io.Reader

Reader returns a reader on the raw yaml descriptors.

func (*ManifestList) ReplaceImages added in v0.13.0

func (l *ManifestList) ReplaceImages(builds []build.Artifact, defaultRepo string) (ManifestList, error)

ReplaceImages replaces image names in a list of manifests.

func (*ManifestList) SetLabels added in v0.23.0

func (l *ManifestList) SetLabels(labels map[string]string) (ManifestList, error)

SetLabels add labels to a list of Kubernetes manifests.

func (*ManifestList) String added in v0.13.0

func (l *ManifestList) String() string

func (*ManifestList) Visit added in v0.13.0

func (l *ManifestList) Visit(replacer Replacer) (ManifestList, error)

Visit recursively visits a list of manifests and applies transformations of them.

type Replacer added in v0.13.0

type Replacer interface {
	Matches(key string) bool

	NewValue(old interface{}) (bool, interface{})
}

Replacer is used to replace portions of yaml manifests that match a given key.

Jump to

Keyboard shortcuts

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