diff --git a/internal/usage/record.go b/internal/usage/record.go index d3ab14b..d03ceff 100644 --- a/internal/usage/record.go +++ b/internal/usage/record.go @@ -27,7 +27,7 @@ type Allocation struct { // storage fraction of total storage Storage float64 `json:"storage,omitempty"` // ephemeral storage fraction of total ephemeral storage - StorageEphemeral float64 `json:"storageEphemeral,omitempty"` + StorageEphemeral float64 `json:"storage_ephemeral,omitempty"` } type Allocations struct { @@ -39,7 +39,7 @@ type Ask struct { CPU int64 `json:"cpu,omitempty"` Memory int64 `json:"memory,omitempty"` Storage int64 `json:"storage,omitempty"` - StorageEphemeral int64 `json:"storageEphemeral,omitempty"` + StorageEphemeral int64 `json:"storage_ephemeral,omitempty"` GPU int64 `json:"gpu,omitempty"` } @@ -60,7 +60,7 @@ type Capacity struct { // local storage in Kibibytes Storage int64 `json:"storage,omitempty"` // ephemeral storage in Kibibytes - StorageEphemeral int64 `json:"storageEphemeral,omitempty"` + StorageEphemeral int64 `json:"storage_ephemeral,omitempty"` } type NodeInfo struct { @@ -70,14 +70,14 @@ type NodeInfo struct { Nodegroup string `json:"nodegroup,omitempty"` InstanceType string `json:"type,omitempty"` // ComputeType: fargate or ec2 - ComputeType string `json:"computeType,omitempty"` + ComputeType string `json:"compute_type,omitempty"` // CapacityType: SPOT or ON_DEMAND - CapacityType string `json:"capacityType,omitempty"` + CapacityType string `json:"capacity_type,omitempty"` Region string `json:"region"` Zone string `json:"zone"` Arch string `json:"arch"` OS string `json:"os"` - OSImage string `json:"osImage"` + OSImage string `json:"os_image"` KernelVersion string `json:"kernel"` KubeletVersion string `json:"kubelet"` Runtime string `json:"runtime"` @@ -91,10 +91,10 @@ type PodInfo struct { Namespace string `json:"namespace"` Labels map[string]string `json:"labels,omitempty"` Node NodeInfo `json:"node"` - QosClass string `json:"qosClass"` - StartTime time.Time `json:"startTime"` - BeginTime time.Time `json:"beginTime"` - EndTime time.Time `json:"endTime"` + QosClass string `json:"qos_class"` + StartTime time.Time `json:"start_time"` + BeginTime time.Time `json:"begin_time"` + EndTime time.Time `json:"end_time"` Resources Resources `json:"resources,omitempty"` Allocations Allocations `json:"allocations,omitempty"` } diff --git a/schema/schema.json b/schema/schema.json index 7bb794e..33c89a5 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -1,6 +1,6 @@ { "type": "record", - "name": "PodInfo", + "name": "pod_info", "fields": [ { "name": "name", @@ -21,7 +21,7 @@ "name": "node", "type": { "type": "record", - "name": "Node", + "name": "node", "fields": [ { "name": "id", @@ -44,11 +44,11 @@ "type": "string" }, { - "name": "computeType", + "name": "compute_type", "type": "string" }, { - "name": "capacityType", + "name": "capacity_type", "type": "string" }, { @@ -68,7 +68,7 @@ "type": "string" }, { - "name": "osImage", + "name": "os_image", "type": "string" }, { @@ -87,7 +87,7 @@ "name": "allocatable", "type": { "type": "record", - "name": "Allocatable", + "name": "allocatable", "fields": [ { "name": "cpu", @@ -113,7 +113,7 @@ "default": 0 }, { - "name": "storageEphemeral", + "name": "storage_ephemeral", "type": "long", "default": 0 } @@ -150,7 +150,7 @@ "default": 0 }, { - "name": "storageEphemeral", + "name": "storage_ephemeral", "type": "long", "default": 0 } @@ -168,26 +168,26 @@ } }, { - "name": "qosClass", + "name": "qos_class", "type": "string", "default": "BestEffort" }, { - "name": "startTime", + "name": "start_time", "type": { "type": "string", "logicalType": "timestamp-millis" } }, { - "name": "beginTime", + "name": "begin_time", "type": { "type": "string", "logicalType": "timestamp-millis" } }, { - "name": "endTime", + "name": "end_time", "type": { "type": "string", "logicalType": "timestamp-millis" @@ -197,13 +197,13 @@ "name": "resources", "type": { "type": "record", - "name": "Resources", + "name": "resources", "fields": [ { "name": "limits", "type": { "type": "record", - "name": "Limits", + "name": "limits", "fields": [ { "name": "cpu", @@ -226,7 +226,7 @@ "default": 0 }, { - "name": "storageEphemeral", + "name": "storage_ephemeral", "type": "long", "default": 0 } @@ -237,7 +237,7 @@ "name": "requests", "type": { "type": "record", - "name": "Requests", + "name": "requests", "fields": [ { "name": "cpu", @@ -260,7 +260,7 @@ "default": 0 }, { - "name": "storageEphemeral", + "name": "storage_ephemeral", "type": "long", "default": 0 } @@ -274,13 +274,13 @@ "name": "allocations", "type": { "type": "record", - "name": "Allocations", + "name": "allocations", "fields": [ { "name": "limits", "type": { "type": "record", - "name": "AllocationLimits", + "name": "allocation_imits", "fields": [ { "name": "cpu", @@ -301,7 +301,7 @@ "default": 0 }, { - "name": "storageEphemeral", + "name": "storage_ephemeral", "type": "double", "default": 0 } @@ -312,7 +312,7 @@ "name": "requests", "type": { "type": "record", - "name": "AllocationRequests", + "name": "allocation_requests", "fields": [ { "name": "cpu", @@ -333,7 +333,7 @@ "default": 0 }, { - "name": "storageEphemeral", + "name": "storage_ephemeral", "type": "double", "default": 0 }