Skip to content

AgentRuntime CRD is Missing Critical Annotations and Types #209

@mahil-2040

Description

@mahil-2040

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

  1. Missing kubebuilder annotations - No +genclient, +k8s:deepcopy-gen:interfaces, +kubebuilder:subresource:status, or +kubebuilder:printcolumn annotations
  2. Missing AgentRuntimeList type - Required for Kubernetes list operations
  3. Empty AgentRuntimeStatus struct - Cannot report readiness or conditions
  4. 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.

Image

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: date

AgentRuntime CRD does not:

$ grep "additionalPrinterColumns:" manifests/charts/base/crds/runtime.agentcube.volcano.sh_agentruntimes.yaml
# No output - not found

Impact

  • Typed client generation - Cannot generate proper typed clients for AgentRuntime
  • List operations - Missing AgentRuntimeList type breaks list functionality
  • kubectl UX - No Age column in kubectl get agentruntimes output
  • Status updates - Cannot report readiness or conditions to users
  • Inconsistency - Two similar runtime CRDs have different structures

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions