node.go 1.4 KB

123456789101112131415161718192021222324
  1. package kubemodel
  2. import "time"
  3. type Node struct {
  4. UID string `json:"uid"`
  5. ClusterUID string `json:"clusterUid"`
  6. ProviderResourceUID string `json:"providerResourceUid"`
  7. Name string `json:"name"`
  8. Labels map[string]string `json:"labels,omitempty"`
  9. Annotations map[string]string `json:"annotations,omitempty"`
  10. Start time.Time `json:"start"`
  11. End time.Time `json:"end"`
  12. CpuMillicoreSecondsAllocated uint64 `json:"cpuMillicoreSecondsAllocated"`
  13. RAMByteSecondsAllocated uint64 `json:"ramByteSecondsAllocated"`
  14. // PublicIPSeconds represents the cumulative public IP allocation (count × seconds) for this node.
  15. // Calculated as: number of ExternalIP addresses from Kubernetes node Status.Addresses × window duration in seconds.
  16. // Used for cost attribution of public IP addresses associated with the node.
  17. PublicIPSecondsAllocated uint64 `json:"publicIpSecondsAllocated"`
  18. CpuMillicoreUsageAverage uint64 `json:"cpuMillicoreUsageAverage"`
  19. CpuMillicoreUsageMax uint64 `json:"cpuMillicoreUsageMax"`
  20. RAMByteUsageAverage uint64 `json:"ramByteUsageAverage"`
  21. RAMByteUsageMax uint64 `json:"ramByteUsageMax"`
  22. }