Documentation ¶
Overview ¶
Copyright 2022-2023 Lawrence Livermore National Security, LLC
(c.f. AUTHORS, NOTICE.LLNS, COPYING)
This is part of the Flux resource manager framework. For details, see https://github.com/flux-framework.
SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- func FindCondition(status *api.MiniClusterStatus, conditionType string) int
- func FlagConditionFinished(job *api.MiniCluster)
- func FlagConditionReady(job *api.MiniCluster)
- func FlagConditionRunning(job *api.MiniCluster)
- func FlagConditionWaiting(job *api.MiniCluster)
- func GetCondition(job *api.MiniCluster) string
- func GetJobConditions() []metav1.Condition
- func HasCondition(job *api.MiniCluster, condition string) bool
- func IsFinished(job *batchv1.Job) bool
- func JobsEqual(jobA *api.MiniCluster, jobB *api.MiniCluster) bool
- func UpdateCondition(job *api.MiniCluster, conditionType string)
- type Info
Constants ¶
const ( // MiniCluster State // Requested: // The default when the job is requested // Waiting + in waiting queue: // The job is waiting to be admitted (there are resources) - before added to heap // Waiting + in heap: // There are resources, and the job has permission to run. We are creating the // MiniCluster (in the heap) and reconciling until it's all there. // Ready: // We finished creating the MiniCluster, and it's ready to run! // Running: // Resources are created, and status is switched from Waiting -> Running by MiniCluster // This should be when we kick off the command. The job is running // Finished: // When resources are done // Finished the job is finished running! ConditionJobRequested string = "JobRequested" ConditionJobWaiting string = "JobWaitingForResources" ConditionJobReady string = "JobMiniClusterReady" ConditionJobRunning string = "JobRunning" ConditionJobFinished string = "JobFinished" )
const ( // Job statuses for logging purposes Waiting = "waiting" Finished = "finished" Running = "running" Requested = "requested" )
Variables ¶
This section is empty.
Functions ¶
func FindCondition ¶
func FindCondition(status *api.MiniClusterStatus, conditionType string) int
FindConditionIndex finds the provided condition from the given status and returns the index. Returns -1 if the condition is not present.
func FlagConditionFinished ¶
func FlagConditionFinished(job *api.MiniCluster)
func FlagConditionReady ¶
func FlagConditionReady(job *api.MiniCluster)
func FlagConditionRunning ¶
func FlagConditionRunning(job *api.MiniCluster)
func FlagConditionWaiting ¶
func FlagConditionWaiting(job *api.MiniCluster)
func GetCondition ¶
func GetCondition(job *api.MiniCluster) string
GetCondition gets the active condition If we eventually allow more than one condition this can return multiple
func GetJobConditions ¶
getJobConditions inits the job conditions. By default, the job request is true since this is the first state it hits!
func HasCondition ¶
func HasCondition(job *api.MiniCluster, condition string) bool
func JobsEqual ¶
func JobsEqual(jobA *api.MiniCluster, jobB *api.MiniCluster) bool
JobsEqual takes a hash of the specs and assesses equality
func UpdateCondition ¶
func UpdateCondition(job *api.MiniCluster, conditionType string)
UpdateCondition sets all conditions to false except for the selected