Description
The KruizeSpec struct in api/v1alpha1/kruize_types.go contains fields using snake_case naming. Go structs should use camelCase for exported fields, while JSON tags can remain in snake_case for API compatibility.
Current State (Inconsistent)
type KruizeSpec struct {
Cluster_type string `json:"cluster_type"` // ❌ snake_case
Autotune_image string `json:"autotune_image"` // ❌ snake_case
Autotune_ui_image string `json:"autotune_ui_image"` // ❌ snake_case
PersistentVolume *PersistentVolumeSpec `json:"persistentVolume,omitempty"` // ✅ camelCase
}
Expected State (Consistent)
type KruizeSpec struct {
ClusterType string `json:"cluster_type"` // ✅ camelCase
AutotuneImage string `json:"autotune_image"` // ✅ camelCase
AutotuneUIImage string `json:"autotune_ui_image"` // ✅ camelCase
PersistentVolume *PersistentVolumeSpec `json:"persistentVolume,omitempty"` // ✅ camelCase
}
Description
The
KruizeSpecstruct inapi/v1alpha1/kruize_types.gocontains fields using snake_case naming. Go structs should use camelCase for exported fields, while JSON tags can remain in snake_case for API compatibility.Current State (Inconsistent)
Expected State (Consistent)