kubectl

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: MIT Imports: 4 Imported by: 2

Documentation

Overview

Package kubectl provides interface and default implementation of kubectl client to be used declaratively.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultKubectl

type DefaultKubectl struct {
	*applier.DirectApplier
	*deleter.DirectDeleter
}

DefaultKubectl is the default implementation of the KubectlClient using direct applier and deleter.

func New

func New() *DefaultKubectl

New returns a new KubectlClient based on direct applier and deleter.

func (*DefaultKubectl) IOStreams

func (d *DefaultKubectl) IOStreams(ioStreams genericclioptions.IOStreams) *DefaultKubectl

IOStreams sets the IOStreams of the applier and deleter.

type KubectlClient

type KubectlClient interface {
	Apply(ctx context.Context, namespace string, manifest string, validate bool, extraArgs ...string) error
	Delete(ctx context.Context, namespace string, manifest string, validate bool, extraArgs ...string) error
}

KubectlClient defines an interface for a kubernetes client that can be used for applying and deleting resources declaratively.

Jump to

Keyboard shortcuts

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