Parent Issue
Part of #27
Description
Bootstrap the Go operator project using Operator SDK and define the Experiment CRD API types.
Scope
- Initialize Go module with
operator-sdk init (domain agentic-layer.ai, group testbench)
- Create the
Experiment API type (v1alpha1) with operator-sdk create api
- Define all Go structs:
ExperimentSpec: agentRef, dataset, llmAsAJudgeModel, defaultThreshold, scenarios, trigger
AgentRef: name, namespace
DatasetSource: s3 (bucket, key), url
Scenario, Step, Metric, Reference, ToolCall structs
TriggerSpec: enabled, event, concurrencyPolicy
- Define
ExperimentStatus struct with conditions, generatedResources, lastExecution
- Add kubebuilder validation markers:
defaultThreshold and metric threshold validated to 0-1 range
dataset and scenarios mutually exclusive (CEL validation rule)
- Required fields marked appropriately
- Generate CRD manifests with
make manifests
- Basic Makefile targets:
build, manifests, generate, docker-build
Acceptance Criteria
References
Parent Issue
Part of #27
Description
Bootstrap the Go operator project using Operator SDK and define the
ExperimentCRD API types.Scope
operator-sdk init(domainagentic-layer.ai, grouptestbench)ExperimentAPI type (v1alpha1) withoperator-sdk create apiExperimentSpec:agentRef,dataset,llmAsAJudgeModel,defaultThreshold,scenarios,triggerAgentRef:name,namespaceDatasetSource:s3(bucket, key),urlScenario,Step,Metric,Reference,ToolCallstructsTriggerSpec:enabled,event,concurrencyPolicyExperimentStatusstruct withconditions,generatedResources,lastExecutiondefaultThresholdand metricthresholdvalidated to 0-1 rangedatasetandscenariosmutually exclusive (CEL validation rule)make manifestsbuild,manifests,generate,docker-buildAcceptance Criteria
operator/directory with working Go moduleapi/v1alpha1/experiment_types.gowith all struct definitionsoperator/config/crd/bases/go build ./...passesmake manifestsgenerates valid CRDReferences