Documentation ¶
Index ¶
- type CLI
- func (c *CLI) Apply(ctx context.Context, out io.Writer, manifests ManifestList) error
- func (c *CLI) CheckVersion(ctx context.Context) error
- func (c *CLI) Delete(ctx context.Context, out io.Writer, manifests ManifestList) error
- func (c *CLI) ReadManifests(ctx context.Context, manifests []string) (ManifestList, error)
- func (c *CLI) Run(ctx context.Context, in io.Reader, out io.Writer, command string, ...) error
- func (c *CLI) Version(ctx context.Context) 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) SetLabels(labels map[string]string) (ManifestList, error)
- func (l *ManifestList) String() string
- func (l *ManifestList) Visit(replacer Replacer) (ManifestList, error)
- type Replacer
- type Version
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 ForceDeploy bool // contains filtered or unexported fields }
CLI holds parameters to run kubectl.
func (*CLI) CheckVersion ¶
CheckVersion warns the user if their kubectl version is < 1.12.0
func (*CLI) ReadManifests ¶
ReadManifests reads a list of manifests in yaml format.
type ClientVersion ¶
ClientVersion is the client version of kubectl.
func (ClientVersion) String ¶
func (v ClientVersion) String() string
type ManifestList ¶
type ManifestList [][]byte
ManifestList is a list of yaml manifests.
func (*ManifestList) Append ¶
func (l *ManifestList) Append(buf []byte)
Append appends the yaml manifests defined in the given buffer.
func (*ManifestList) Diff ¶
func (l *ManifestList) Diff(latest ManifestList) ManifestList
Diff computes the list of manifests that have changed.
func (*ManifestList) Reader ¶
func (l *ManifestList) Reader() io.Reader
Reader returns a reader on the raw yaml descriptors.
func (*ManifestList) ReplaceImages ¶
func (l *ManifestList) ReplaceImages(builds []build.Artifact, defaultRepo string) (ManifestList, error)
ReplaceImages replaces image names in a list of manifests.
func (*ManifestList) SetLabels ¶
func (l *ManifestList) SetLabels(labels map[string]string) (ManifestList, error)
SetLabels add labels to a list of Kubernetes manifests.
func (*ManifestList) String ¶
func (l *ManifestList) String() string
func (*ManifestList) Visit ¶
func (l *ManifestList) Visit(replacer Replacer) (ManifestList, error)
Visit recursively visits a list of manifests and applies transformations of them.
type Version ¶
type Version struct {
Client ClientVersion `json:"clientVersion"`
}
Version is the client version of kubectl.