jobs

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package jobs creates example Job objects in Kubernetes.

Index

Constants

View Source
const (

	// JobNamePi creates basic Job object using Perl.
	// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
	JobNamePi = "pi"

	// JobNameEcho creates Job object that simply echoes data.
	JobNameEcho = "echo"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger *zap.Logger

	Stopc chan struct{}
	Sig   chan os.Signal

	K8SClient *clientset.Clientset

	// Namespace is the namespace to create Jobs.
	Namespace string
	// JobName is the example Job type.
	JobName string

	// Completes the desired number of successfully finished pods.
	Completes int
	// Parallels is the the maximum desired number of pods the job should
	// run at any given time.
	Parallels int

	// EchoSize is the size of payload for echo Job.
	EchoSize int
}

Config defines 'Job' configuration.

type Tester

type Tester interface {
	// Create creates Job objects, and waits for completion.
	Create() error
	// Delete deletes all Job objects.
	Delete() error
}

Tester defines Job tester.

func New

func New(cfg Config) (Tester, error)

New creates a new Job tester.

Jump to

Keyboard shortcuts

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