Kubernetes API

API Docs

Table of Contents

Experiment

Experiment is the Schema for the experiments API

Field Description Scheme Required
metadata Standard object metadata ObjectMeta false
spec Specification of the desired behavior for an experiment ExperimentSpec false
status Current status of an experiment ExperimentStatus false

Back to TOC

ExperimentList

ExperimentList contains a list of Experiment

Field Description Scheme Required
metadata Standard list metadata ListMeta false
items The list of experiments []Experiment true

Back to TOC

ExperimentSpec

ExperimentSpec defines the desired state of Experiment

Field Description Scheme Required
replicas Replicas is the number of trials to execute concurrently, defaults to 1 *int32 false
parallelism Parallelism is the total number of expected replicas across all clusters, defaults to the replica count *int32 false
burnIn Burn-in is the number of trials using random suggestions at the start of an experiment *int32 false
budget Budget is the maximum number of trials to run for an experiment across all clusters *int32 false
parameters Parameters defines the search space for the experiment []Parameter false
metrics Metrics defines the outcomes for the experiment []Metric false
patches Patches is a sequence of templates written against the experiment parameters that will be used to put the cluster into the desired state []PatchTemplate false
namespaceSelector NamespaceSelector is used to determine which namespaces on a cluster can be used to create trials. Only a single trial can be created in each namespace so if there are fewer matching namespaces then replicas, no trials will be created *LabelSelector false
selector Selector locates trial resources that are part of this experiment *LabelSelector false
template Template for creating a new trial. The resulting trial must be matched by Selector. The template can provide an initial namespace, however other namespaces (matched by NamespaceSelector) will be used if the effective replica count is more then one TrialTemplateSpec true

Back to TOC

ExperimentStatus

ExperimentStatus defines the observed state of Experiment

Field Description Scheme Required
activeTrials ActiveTrials is the observed number of running trials int32 true

Back to TOC

Metric

Metric represents an observable outcome from a trial run

Field Description Scheme Required
name The name of the metric string true
minimize Indicator that the goal of the experiment is to minimize the value of this metric bool false
type The metric collection type, one of: local|prometheus|jsonpath, default: local MetricType false
query Collection type specific query, e.g. Go template for “local”, PromQL for “prometheus” or a JSON pointer expression (with curly braces) for “jsonpath” string true
errorQuery Collection type specific query for the error associated with collected metric value string false
scheme The scheme to use when collecting metrics string false
selector Selector matching services to collect this metric from, only the first matched service to provide a value is used *LabelSelector false
port The port number or name on the matched service to collect the metric value from intstr.IntOrString false
path URL path component used to collect the metric value from an endpoint (used as a prefix for the Prometheus API) string false

Back to TOC

Parameter

Parameter represents the domain of a single component of the experiment search space

Field Description Scheme Required
name The name of the parameter string true
min The inclusive minimum value of the parameter int64 false
max The inclusive maximum value of the parameter int64 false

Back to TOC

PatchTemplate

PatchTemplate defines a target resource and a patch template to apply

Field Description Scheme Required
type The patch type, one of: json|merge|strategic, default: strategic PatchType false
patch A Go Template that evaluates to valid patch. string true
targetRef Direct reference to the object the patch should be applied to. *ObjectReference false

Back to TOC

TrialTemplateSpec

TrialTemplateSpec is used as a template for creating new trials

Field Description Scheme Required
metadata Standard object metadata ObjectMeta false
spec Specification of the desired behavior for the trial TrialSpec true

Back to TOC

API Docs

Table of Contents

Assignment

Assignment represents an individual name/value pair. Assignment names must correspond to parameter names on the associated experiment.

Field Description Scheme Required
name Parameter name being assigned string true
value The value of the assignment int64 true

Back to TOC

ConfigMapHelmValuesFromSource

ConfigMapHelmValuesFromSource is a reference to a ConfigMap that contains “*values.yaml” keys

Field Description Scheme Required
N/A

Back to TOC

HelmValue

HelmValue represents a value in a Helm template

Field Description Scheme Required
name The name of Helm value as passed to one of the set options string true
forceString Force the value to be treated as a string bool false
value Set a Helm value using the evaluated template. Templates are evaluated using the same rules as patches intstr.IntOrString false
valueFrom Source for a Helm value *HelmValueSource false

Back to TOC

HelmValueSource

HelmValueSource represents a source for a Helm value

Field Description Scheme Required
parameterRef Selects a trial parameter assignment as a Helm value *ParameterSelector false

Back to TOC

HelmValuesFromSource

HelmValueFromSource represents a source of a values mapping

Field Description Scheme Required
configMap The ConfigMap to select from *ConfigMapHelmValuesFromSource false

Back to TOC

ParameterSelector

ParameterSelector selects a trial parameter assignment. Note that parameters values are used as is (i.e. in numeric form), for more control over the formatting of a parameter assignment use the template option on HelmValue.

Field Description Scheme Required
name The name of the trial parameter to use string true

Back to TOC

PatchOperation

PatchOperation represents a patch used to prepare the cluster for a trial run, includes the evaluated parameter assignments as necessary

Field Description Scheme Required
targetRef The reference to the object that the patched should be applied to ObjectReference true
patchType The patch content type, must be a type supported by the Kubernetes API server types.PatchType true
data The raw data representing the patch to be applied []byte true
attemptsRemaining The number of remaining attempts to apply the patch, will be automatically set to zero if the patch is successfully applied int false
wait Wait for the patched object to stabilize bool false

Back to TOC

SetupTask

SetupTask represents the configuration necessary to apply application state to the cluster prior to each trial run and remove that state after the run concludes

Field Description Scheme Required
name The name that uniquely identifies the setup task string true
image Override the default image used for performing setup tasks string false
skipCreate Flag to indicate the creation part of the task can be skipped bool false
skipDelete Flag to indicate the deletion part of the task can be skipped bool false
volumeMounts Volume mounts for the setup task []VolumeMount false
helmChart The Helm chart reference to release as part of this task string false
helmChartVersion The Helm chart version, empty means use the latest string false
helmValues The Helm values to set, ignored unless helmChart is also set []HelmValue false
helmValuesFrom The Helm values, ignored unless helmChart is also set []HelmValuesFromSource false

Back to TOC

Trial

Trial is the Schema for the trials API

Field Description Scheme Required
metadata Standard object metadata ObjectMeta false
spec Specification of the desired behavior for a trial TrialSpec false
status Current status of a trial TrialStatus false

Back to TOC

TrialCondition

TrialCondition represents an observed condition of a trial

Field Description Scheme Required
type The condition type, e.g. “redskyops.dev/trial-complete” TrialConditionType true
status The status of the condition, one of “True”, “False”, or “Unknown corev1.ConditionStatus true
lastProbeTime The last known time the condition was checked Time true
lastTransitionTime The time at which the condition last changed status Time true
reason A reason code describing the why the condition occurred string false
message A human readable message describing the transition string false

Back to TOC

TrialList

TrialList contains a list of Trial

Field Description Scheme Required
metadata Standard list metadata ListMeta false
items The list of trials []Trial true

Back to TOC

TrialSpec

TrialSpec defines the desired state of Trial

Field Description Scheme Required
experimentRef ExperimentRef is the reference to the experiment that contains the definitions to use for this trial, defaults to an experiment in the same namespace with the same name *ObjectReference false
targetNamespace TargetNamespace defines the default namespace of the objects to apply patches to, defaults to the namespace of the trial string false
assignments Assignments are used to patch the cluster state prior to the trial run []Assignment false
selector Selector matches the job representing the trial run *LabelSelector false
template Template is the job template used to create trial run jobs *JobTemplateSpec false
startTimeOffset The offset used to adjust the start time to account for spin up of the trial run *metav1.Duration false
approximateRuntime The approximate amount of time the trial run should execute (not inclusive of the start time offset) *metav1.Duration false
ttlSecondsAfterFinished The minimum number of seconds before an attempt should be made to clean up the trial *int32 false
values Values are the collected metrics at the end of the trial run []Value false
patchOperations PatchOperations are the patches from the experiment evaluated in the context of this trial []PatchOperation false
setupTasks Setup tasks that must run before the trial starts (and possibly after it ends) []SetupTask false
setupVolumes Volumes to make available to setup tasks, typically ConfigMap backed volumes []Volume false
setupServiceAccountName Service account name for running setup tasks, needs enough permissions to add and remove software string false

Back to TOC

TrialStatus

TrialStatus defines the observed state of Trial

Field Description Scheme Required
assignments Assignments is a string representation of the trial assignments for reporting purposes string true
values Values is a string representation of the trial values for reporting purposes string true
startTime StartTime is the effective (possibly adjusted) time the trial run job started *Time false
completionTime CompletionTime is the effective (possibly adjusted) time the trial run job completed *Time false
conditions Condition is the current state of the trial []TrialCondition false

Back to TOC

Value

Value represents an observed metric value after a trial run has completed successfully. Value names must correspond to metric names on the associated experiment.

Field Description Scheme Required
name The metric name the value corresponds to string true
value The observed float64 value, formatted as a string string true
error The observed float64 error (standard deviation), formatted as a string string false
attemptsRemaining The number of remaining attempts to observer the value, will be automatically set to zero if the metric is successfully collected int false

Back to TOC