Documentation
¶
Index ¶
- Variables
- func CommandReaders(cmd *cobra.Command, args []string) []kio.Reader
- func CommandWriters(cmd *cobra.Command, overwriteFiles bool) []kio.Writer
- func Decode(values ...interface{}) kio.Writer
- func Encode(values ...interface{}) kio.Reader
- type ErrorReader
- type ExecReader
- type ExecWriter
- type HelmValues
- type Kubectl
- func (k *Kubectl) Apply(ctx context.Context, dryRun string) *ExecWriter
- func (k *Kubectl) Command(ctx context.Context, args ...string) *exec.Cmd
- func (k *Kubectl) Create(ctx context.Context, dryRun string) *ExecWriter
- func (k *Kubectl) Delete(ctx context.Context, dryRun string, ignoreNotFound bool) *ExecWriter
- func (k *Kubectl) Get(ctx context.Context, objs ...string) *ExecReader
- func (k *Kubectl) Reader(ctx context.Context, args ...string) *ExecReader
- func (k *Kubectl) Writer(ctx context.Context, args ...string) *ExecWriter
- type ReadOneFunc
- type ReaderFunc
- type TemplateReader
Constants ¶
This section is empty.
Variables ¶
var CommandWriterFormatFlag = "output"
CommandWriterFormatFlag is a global that can be overwritten to change the name of the flag used to get the output format from the command.
Functions ¶
func CommandReaders ¶
CommandReaders returns KYAML readers for the supplied file name arguments.
func CommandWriters ¶
CommandWriters returns KYAML writers for the supplied command.
Types ¶
type ErrorReader ¶ added in v0.3.11
type ErrorReader struct{ Err error }
ErrorReader is an adapter to allow the use of an error as a kio.Reader.
type ExecReader ¶
ExecReader is a KYAML reader that consumes YAML from another process via stdout.
type ExecWriter ¶
ExecWriter is a KYAML writer that sends YAML to another process via stdin.
type HelmValues ¶ added in v0.3.12
type HelmValues struct { // User specified values files (via -f/--values). ValueFiles []string // User specified values (via --set). Values []string // User specified string values (via --set-string). StringValues []string // User specified file values (via --set-file). FileValues []string // The file system to use for resolving file contents (defaults to the OS reader). FS fs.FS }
HelmValues is a reader that emits resource nodes representing Helm values.
type Kubectl ¶
type Kubectl struct { // The path the kubectl binary, defaults to `kubectl`. Bin string // The path to the kubeconfig. KubeConfig string // The context name. Context string // The namespace name. Namespace string // The length of time to wait before giving up on a single request. RequestTimeout time.Duration }
Kubectl is used for executing `kubectl` as part of a KYAML pipeline.
func (*Kubectl) Apply ¶
func (k *Kubectl) Apply(ctx context.Context, dryRun string) *ExecWriter
Apply returns a sink for applying resources via kubectl.
func (*Kubectl) Command ¶
Command creates a new executable command with the configured global flags and the supplied arguments.
func (*Kubectl) Create ¶
func (k *Kubectl) Create(ctx context.Context, dryRun string) *ExecWriter
Create returns a sink for creating resources via kubectl.
func (*Kubectl) Get ¶
func (k *Kubectl) Get(ctx context.Context, objs ...string) *ExecReader
Get returns a source for getting resources via kubectl.
type ReadOneFunc ¶ added in v0.3.12
ReadOneFunc is an adapter to allow the use of single node returning functions as a kio.Reader.
type ReaderFunc ¶ added in v0.3.11
ReaderFunc is an adapter to allow the use of ordinary functions as a kio.Reader.
type TemplateReader ¶
type TemplateReader struct { // The template to execute. Template *template.Template // The data for the template. Data interface{} }
TemplateReader is a KYAML reader that consumes YAML from a Go template.