Operator: Scaffold Go project with Operator SDK and define Experiment CRD types#32
Draft
Operator: Scaffold Go project with Operator SDK and define Experiment CRD types#32
Conversation
- Initialize Go module with operator-sdk (domain: agentic-layer.ai) - Create Experiment API v1alpha1 with all required types - Define ExperimentSpec with agentRef, dataset, llmAsAJudgeModel, defaultThreshold, scenarios, trigger - Define supporting types: AgentRef, DatasetSource, S3Source, Scenario, Step, Metric, Reference, ToolCall, TriggerSpec - Define ExperimentStatus with conditions, generatedResources, lastExecution - Add kubebuilder validation markers: - Threshold ranges (0.0-1.0) on defaultThreshold and metric threshold - MinItems validation on scenario steps - Enum validation on concurrencyPolicy (Allow, Forbid, Replace) - CEL validation rule for dataset/scenarios mutual exclusivity - Generate CRD manifests with make manifests - Update sample CR with realistic example - Verify go build ./... passes successfully Co-authored-by: fmallmann <30110193+fmallmann@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add initial Go project scaffolding with Experiment CRD types
Operator: Scaffold Go project with Operator SDK and define Experiment CRD types
Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bootstrap the testbench operator with a complete Experiment CRD schema to enable Kubernetes-native agent evaluation workflows.
CRD Structure
ExperimentSpec defines evaluation configuration:
agentRef: Target agent (name, namespace)dataset: S3/URL source for test data (mutually exclusive with inline scenarios)scenarios: Inline test scenarios with steps, metrics, and reference datallmAsAJudgeModel: Model for metric evaluation (e.g.,gemini-2.5-flash-lite)defaultThreshold: Global pass/fail threshold (0.0-1.0, default: 0.9)trigger: Execution policy (enabled, event, concurrencyPolicy)ExperimentStatus tracks reconciliation state:
conditions: Standard Kubernetes conditionsgeneratedResources: Created TestWorkflow resourceslastExecution: Testkube execution metadata (ID, number, timestamps, status)Validation
!(has(self.dataset) && has(self.scenarios))Allow,Forbid,ReplaceminItems: 1Technical Notes
runtime.RawExtensionfor flexible JSON fields (ToolCall args, Step customValues, Metric parameters)crd:allowDangerousTypes=truein Makefile for float64 threshold fieldsconfig/crd/bases/testbench.agentic-layer.ai_experiments.yamlOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.