jobs

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TaskSourceType = "TASK"

	AnnotationGUID                        = "workloads.cloudfoundry.org/guid"
	AnnotationAppName                     = stset.AnnotationAppName
	AnnotationAppID                       = stset.AnnotationAppID
	AnnotationOrgName                     = stset.AnnotationOrgName
	AnnotationOrgGUID                     = stset.AnnotationOrgGUID
	AnnotationSpaceName                   = stset.AnnotationSpaceName
	AnnotationSpaceGUID                   = stset.AnnotationSpaceGUID
	AnnotationTaskContainerName           = "workloads.cloudfoundry.org/opi-task-container-name"
	AnnotationTaskCompletionReportCounter = "workloads.cloudfoundry.org/task_completion_report_counter"
	AnnotationCCAckedTaskCompletion       = "workloads.cloudfoundry.org/cc_acked_task_completion"

	LabelGUID          = stset.LabelGUID
	LabelName          = "workloads.cloudfoundry.org/name"
	LabelAppGUID       = stset.LabelAppGUID
	LabelSourceType    = stset.LabelSourceType
	LabelTaskCompleted = "workloads.cloudfoundry.org/task_completed"

	TaskCompletedTrue                 = "true"
	PrivateRegistrySecretGenerateName = stset.PrivateRegistrySecretGenerateName
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter struct {
	// contains filtered or unexported fields
}

func NewTaskToJobConverter

func NewTaskToJobConverter(
	serviceAccountName string,
	registrySecretName string,
	allowAutomountServiceAccountToken bool,
) *Converter

func (*Converter) Convert

func (m *Converter) Convert(task *eiriniv1.Task, privateRegistrySecret *corev1.Secret) *batch.Job

type Desirer

type Desirer struct {
	// contains filtered or unexported fields
}

func NewDesirer

func NewDesirer(
	logger lager.Logger,
	taskToJobConverter TaskToJobConverter,
	client client.Client,
	scheme *runtime.Scheme,
) *Desirer

func (*Desirer) Desire

func (d *Desirer) Desire(ctx context.Context, task *eiriniv1.Task) error

type JobCreator

type JobCreator interface {
	Create(ctx context.Context, namespace string, job *batch.Job) (*batch.Job, error)
}

type SecretsClient

type SecretsClient interface {
	Create(ctx context.Context, namespace string, secret *corev1.Secret) (*corev1.Secret, error)
	SetOwner(ctx context.Context, secret *corev1.Secret, owner metav1.Object) (*corev1.Secret, error)
	Delete(ctx context.Context, namespace string, name string) error
}

type StatusGetter

type StatusGetter struct {
	// contains filtered or unexported fields
}

func NewStatusGetter

func NewStatusGetter(logger lager.Logger) *StatusGetter

func (*StatusGetter) GetStatus

func (s *StatusGetter) GetStatus(ctx context.Context, job *batchv1.Job) eiriniv1.TaskStatus

type TaskToJobConverter

type TaskToJobConverter interface {
	Convert(*eiriniv1.Task, *corev1.Secret) *batch.Job
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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