What would you like to be added:
Replace the Workload Manager's dynamic informers for AgentRuntime and CodeInterpreter with the generated typed clientset informers under client-go/informers/externalversions.
Today pkg/workloadmanager/informers.go wires these CRDs through dynamicInformer.ForResource(...), and pkg/workloadmanager/workload_builder.go converts cached unstructured.Unstructured objects back into typed runtime objects. Existing TODO for this at the buildSandboxByAgentRuntime and buildSandboxByCodeInterpreter lookup paths by @hzxuzhonghu .
Proposed scope:
- Add/use the generated AgentCube versioned clientset in
K8sClient.
- Add a typed AgentCube informer factory from
client-go/informers/externalversions.
- Wire
AgentRuntimeInformer and CodeInterpreterInformer from the typed factory.
- Start and sync the typed informer factory alongside the core Kubernetes informer factory.
- Update workload builder code to consume typed
*runtimev1alpha1.AgentRuntime and *runtimev1alpha1.CodeInterpreter objects directly.
- Remove the
unstructured conversion path for these two cached runtime resources.
Why is this needed:
The generated typed informers already exist in the repo but the Workload Manager still uses dynamic informers for AgentCube runtime resources. Moving to typed informers improves type safety removes conversion boilerplate, resolves the existing TODOs, and makes future workload-manager changes easier to test and maintain.
What would you like to be added:
Replace the Workload Manager's dynamic informers for
AgentRuntimeandCodeInterpreterwith the generated typed clientset informers underclient-go/informers/externalversions.Today
pkg/workloadmanager/informers.gowires these CRDs throughdynamicInformer.ForResource(...), andpkg/workloadmanager/workload_builder.goconverts cachedunstructured.Unstructuredobjects back into typed runtime objects. Existing TODO for this at thebuildSandboxByAgentRuntimeandbuildSandboxByCodeInterpreterlookup paths by @hzxuzhonghu .Proposed scope:
K8sClient.client-go/informers/externalversions.AgentRuntimeInformerandCodeInterpreterInformerfrom the typed factory.*runtimev1alpha1.AgentRuntimeand*runtimev1alpha1.CodeInterpreterobjects directly.unstructuredconversion path for these two cached runtime resources.Why is this needed:
The generated typed informers already exist in the repo but the Workload Manager still uses dynamic informers for AgentCube runtime resources. Moving to typed informers improves type safety removes conversion boilerplate, resolves the existing TODOs, and makes future workload-manager changes easier to test and maintain.