Documentation ¶
Index ¶
- type CLI
- func (c *CLI) Apply(ctx context.Context, out io.Writer, manifests ManifestList) (ManifestList, error)
- func (c *CLI) CheckVersion() error
- func (c *CLI) Delete(ctx context.Context, out io.Writer, manifests ManifestList) error
- func (c *CLI) Run(ctx context.Context, in io.Reader, out io.Writer, command string, ...) error
- func (c *CLI) Version() ClientVersion
- type ClientVersion
- type ManifestList
- func (l *ManifestList) Append(buf []byte)
- func (l *ManifestList) Diff(latest ManifestList) ManifestList
- func (l *ManifestList) Reader() io.Reader
- func (l *ManifestList) ReplaceImages(builds []build.Artifact, defaultRepo string) (ManifestList, error)
- func (l *ManifestList) String() string
- func (l *ManifestList) Visit(replacer Replacer) (ManifestList, error)
- type Replacer
- type Version
- type Warner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLI ¶
type CLI struct { Namespace string KubeContext string Flags latest.KubectlFlags // 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) (ManifestList, error)
Apply runs `kubectl apply` on a list of manifests.
func (*CLI) CheckVersion ¶ added in v0.16.0
CheckVersion warns the user if their kubectl version is < 1.12.0
func (*CLI) Run ¶
func (c *CLI) Run(ctx context.Context, in io.Reader, out io.Writer, command string, commandFlags []string, arg ...string) error
Run shells out kubectl CLI.
func (*CLI) Version ¶ added in v0.15.0
func (c *CLI) Version() ClientVersion
Version returns the client version of kubectl.
type ClientVersion ¶ added in v0.15.0
ClientVersion is the client version of kubectl.
func (ClientVersion) String ¶ added in v0.15.0
func (v ClientVersion) String() string
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) 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
Replacer is used to replace portions of yaml manifests that match a given key.
type Version ¶ added in v0.15.0
type Version struct {
Client ClientVersion `json:"clientVersion"`
}
Version is the client version of kubectl.