app

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: MPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPodCompleted = fmt.Errorf("pod ran to completion")

ErrPodCompleted is returned by PodRunning or PodContainerRunning to indicate that the pod has already reached completed state.

Functions

func CreateTar

func CreateTar() (*bytes.Buffer, error)

TODO: unit test

func InitClient

func InitClient() (*client.Client, *kubernetes.Clientset, error)

Types

type App

type App struct {
	Workspace string
	Namespace string
	Tarball   *bytes.Buffer
	Args      []string
	Resources []runtime.Object
	// embed?
	Client client.Client
	// embed?
	KubeClient kubernetes.Interface
}

func (*App) AddToCleanup

func (app *App) AddToCleanup(resource runtime.Object)

func (*App) CheckWorkspaceExists

func (app *App) CheckWorkspaceExists() (bool, error)

func (*App) Cleanup

func (app *App) Cleanup()

func (*App) CreateCommand

func (app *App) CreateCommand(name string) error

func (*App) CreateConfigMap

func (app *App) CreateConfigMap(tarball *bytes.Buffer) (string, error)

func (*App) Run

func (app *App) Run() error

func (*App) WaitForPod

func (app *App) WaitForPod(name string, exitCondition watchtools.ConditionFunc, timeout time.Duration) (*corev1.Pod, error)

waitForPod watches the given pod until the exitCondition is true

Jump to

Keyboard shortcuts

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