Documentation
¶
Index ¶
- Variables
- func ApplyCondition(status *redskyv1alpha1.TrialStatus, ...)
- func CheckCondition(status *redskyv1alpha1.TrialStatus, ...) (bool, bool)
- func IsTrialActive(trial *redskyv1alpha1.Trial) bool
- func IsTrialFinished(trial *redskyv1alpha1.Trial) bool
- func ManageSetup(c client.Client, s *runtime.Scheme, ctx context.Context, ...) (*ctrl.Result, error)
- func WaitForStableState(r client.Reader, ctx context.Context, log logr.Logger, ...) error
- type StabilityError
Constants ¶
This section is empty.
Variables ¶
var ( // This is overwritten during builds to point to the actual image Image = "setuptools:latest" ImagePullPolicy string = string(corev1.PullIfNotPresent) )
Functions ¶
func ApplyCondition ¶ added in v1.1.1
func ApplyCondition(status *redskyv1alpha1.TrialStatus, conditionType redskyv1alpha1.TrialConditionType, conditionStatus corev1.ConditionStatus, reason, message string, time *metav1.Time)
ApplyCondition updates a the status of an existing condition or adds it if it does not exist
func CheckCondition ¶ added in v1.1.1
func CheckCondition(status *redskyv1alpha1.TrialStatus, conditionType redskyv1alpha1.TrialConditionType, conditionStatus corev1.ConditionStatus) (bool, bool)
CheckCondition checks to see if a condition has a specific status and if it exists
func IsTrialActive ¶ added in v1.2.0
func IsTrialActive(trial *redskyv1alpha1.Trial) bool
IsTrialActive checks to see if the specified trial and any setup delete tasks are NOT finished
func IsTrialFinished ¶
func IsTrialFinished(trial *redskyv1alpha1.Trial) bool
IsTrialFinished checks to see if the specified trial is finished
func ManageSetup ¶ added in v1.1.1
func WaitForStableState ¶ added in v1.1.1
func WaitForStableState(r client.Reader, ctx context.Context, log logr.Logger, p *redskyv1alpha1.PatchOperation) error
WaitForStableState checks to see if the object referenced by the supplied patch operation has stabilized. If stabilization has not occurred, an error is returned: errors with a delay indicate that the resource is not ready, errors without a delay indicate the resource is never expected to become ready.
Types ¶
type StabilityError ¶
type StabilityError struct {
// The reason for the stability error
Reason string
// The object on which the stability problem was detected
TargetRef corev1.ObjectReference
// The minimum amount of time until the object is expected to stabilize, if left unspecified there is no expectation of stability
RetryAfter time.Duration
}
StabilityError indicates that the cluster has not reached a sufficiently stable state
func (*StabilityError) Error ¶
func (e *StabilityError) Error() string