Documentation
¶
Overview ¶
Copyright 2019 GramLabs, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 GramLabs, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 GramLabs, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 GramLabs, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 GramLabs, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- func ApplyCondition(status *redskyv1alpha1.TrialStatus, ...)
- func CaptureMetric(m *redskyv1alpha1.Metric, u string, trial *redskyv1alpha1.Trial) (float64, float64, time.Duration, error)
- func CheckCondition(status *redskyv1alpha1.TrialStatus, ...) (bool, bool)
- func ExecutePatchTemplate(p *redskyv1alpha1.PatchTemplate, trial *redskyv1alpha1.Trial) (types.PatchType, []byte, error)
- func IsTrialFinished(trial *redskyv1alpha1.Trial) bool
- func ManageSetup(c client.Client, s *runtime.Scheme, ctx context.Context, log logr.Logger, ...) (reconcile.Result, bool, 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
DefaultImage = "setuptools:latest"
)
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)
Updates a the status of an existing condition or adds it if it does not exist
func CaptureMetric ¶ added in v1.1.1
func CaptureMetric(m *redskyv1alpha1.Metric, u string, trial *redskyv1alpha1.Trial) (float64, float64, time.Duration, error)
func CheckCondition ¶ added in v1.1.1
func CheckCondition(status *redskyv1alpha1.TrialStatus, conditionType redskyv1alpha1.TrialConditionType, conditionStatus corev1.ConditionStatus) (bool, bool)
Checks to see if a condition has a specific status and if it exists
func ExecutePatchTemplate ¶ added in v1.1.1
func ExecutePatchTemplate(p *redskyv1alpha1.PatchTemplate, trial *redskyv1alpha1.Trial) (types.PatchType, []byte, error)
func IsTrialFinished ¶
func IsTrialFinished(trial *redskyv1alpha1.Trial) bool
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
Iterates over all of the supplied patches and ensures that the targets are in a "stable" state (where "stable" is determined by the object kind).
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