Documentation ¶
Index ¶
- Constants
- Variables
- func AppendAssignmentEnv(t *redskyv1beta1.Trial, env []corev1.EnvVar) []corev1.EnvVar
- func AppendPrometheusEnv(t *redskyv1beta1.Trial, env []corev1.EnvVar) []corev1.EnvVar
- func GetConditionStatus(j *batchv1.Job) (corev1.ConditionStatus, string)
- func GetTrialConditionType(j *batchv1.Job) (redskyv1beta1.TrialConditionType, error)
- func IsPrometheusSetupTask(st *redskyv1beta1.SetupTask) bool
- func NewJob(t *redskyv1beta1.Trial, mode string) (*batchv1.Job, error)
- func UpdateStatus(t *redskyv1beta1.Trial, probeTime *metav1.Time) bool
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 ¶
AppendAssignmentEnv appends an environment variable for each trial assignment
func AppendPrometheusEnv ¶
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 UpdateStatus ¶
func UpdateStatus(t *redskyv1beta1.Trial, probeTime *metav1.Time) bool
UpdateStatus returns true if there are setup tasks
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.