setup

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModeCreate is the primary argument to the setup tools container when the task is creating objects
	ModeCreate = "create"
	// ModeDelete is the primary argument to the setup tools container when the task is deleting objects
	ModeDelete = "delete"

	// Initializer is used to paused the trial initialization for setup tasks
	Initializer = "setupInitializer.redskyops.dev"
	// Finalizer is used to prevent the trial deletion for setup tasks
	Finalizer = "setupFinalizer.redskyops.dev"
)

Variables

View Source
var (
	// Image is the name of the setuptools image to use
	Image = "setuptools:latest"
	// ImagePullPolicy controls when the default image should be pulled
	ImagePullPolicy = string(corev1.PullIfNotPresent)
)

This is overwritten during builds to point to the actual image

Functions

func AppendAssignmentEnv

func AppendAssignmentEnv(t *redskyv1beta1.Trial, env []corev1.EnvVar) []corev1.EnvVar

AppendAssignmentEnv appends an environment variable for each trial assignment

func AppendPrometheusEnv

func AppendPrometheusEnv(t *redskyv1beta1.Trial, env []corev1.EnvVar) []corev1.EnvVar

AppendPrometheusEnv appends environment variables to help reference the built in Prometheus

func GetConditionStatus

func GetConditionStatus(j *batchv1.Job) (corev1.ConditionStatus, string)

GetConditionStatus returns condition True for a finished job or condition False for an job in progress

func GetTrialConditionType

func GetTrialConditionType(j *batchv1.Job) (redskyv1beta1.TrialConditionType, error)

GetTrialConditionType returns the trial condition type used to report status for the specified job

func IsPrometheusSetupTask

func IsPrometheusSetupTask(st *redskyv1beta1.SetupTask) bool

IsPrometheusSetupTask checks to see if the supplied setup task is for the built-in Prometheus.

func NewJob

func NewJob(t *redskyv1beta1.Trial, mode string) (*batchv1.Job, error)

NewJob returns a new setup job for either create or delete

func UpdateStatus

func UpdateStatus(t *redskyv1beta1.Trial, probeTime *metav1.Time) bool

UpdateStatus returns true if there are setup tasks

Types

This section is empty.

Jump to

Keyboard shortcuts

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