-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Description
The AgentRuntime CRD is missing several critical kubebuilder annotations and type definitions that are present in the similar CodeInterpreter CRD, causing inconsistency and potential issues with typed client generation.
Current Issues
- Missing kubebuilder annotations - No
+genclient,+k8s:deepcopy-gen:interfaces,+kubebuilder:subresource:status, or+kubebuilder:printcolumnannotations - Missing
AgentRuntimeListtype - Required for Kubernetes list operations - Empty
AgentRuntimeStatusstruct - Cannot report readiness or conditions - Missing
DeepCopyObject()method in generated code - Required for typed client-go usage
File: pkg/apis/runtime/v1alpha1/agent_type.go (Lines 18-28)
Current state:
// AgentRuntime defines the desired state of an agent runtime environment.
type AgentRuntime struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty,omitzero" protobuf:"bytes,1,opt,name=metadata"`
Spec AgentRuntimeSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
Status AgentRuntimeStatus `json:"status" protobuf:"bytes,3,opt,name=status"`
}Compare to CodeInterpreter in codeinterpreter_types.go (Lines 29-42):
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Namespaced
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
type CodeInterpreter struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CodeInterpreterSpec `json:"spec"`
Status CodeInterpreterStatus `json:"status,omitempty"`
}Generated code comparison:
CodeInterpreter has DeepCopyObject() method in zz_generated.deepcopy.go:
func (in *CodeInterpreter) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}AgentRuntime is missing this method entirely.
CRD Manifest comparison:
CodeInterpreter CRD has printer columns:
$ grep -A 3 "additionalPrinterColumns:" manifests/charts/base/crds/runtime.agentcube.volcano.sh_codeinterpreters.yaml
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: Age
type: dateAgentRuntime CRD does not:
$ grep "additionalPrinterColumns:" manifests/charts/base/crds/runtime.agentcube.volcano.sh_agentruntimes.yaml
# No output - not foundImpact
- Typed client generation - Cannot generate proper typed clients for AgentRuntime
- List operations - Missing
AgentRuntimeListtype breaks list functionality - kubectl UX - No Age column in
kubectl get agentruntimesoutput - Status updates - Cannot report readiness or conditions to users
- Inconsistency - Two similar runtime CRDs have different structures
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels