pod.proto 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. syntax = "proto3";
  2. import "kubemodel/diagnostic.proto";
  3. import "google/protobuf/timestamp.proto";
  4. package kubemodel;
  5. option go_package = "github.com/opencost/opencost/core/pkg/model/pb/kubemodel";
  6. // Pod represents a Kubernetes pod (allocated resource grouping)
  7. message Pod {
  8. // Identification
  9. string ID = 1;
  10. string namespaceID = 2;
  11. string controllerID = 3;
  12. string nodeID = 4;
  13. // Properties
  14. string name = 5;
  15. map<string, string> labels = 6;
  16. map<string, string> annotations = 7;
  17. // Resource lifecycle (only when different from cluster window)
  18. optional google.protobuf.Timestamp creationTime = 8;
  19. optional google.protobuf.Timestamp deletionTime = 9;
  20. // Usage metrics
  21. // CPU usage in core-hours
  22. float cpuCoreHours = 10;
  23. // CPU request average in cores
  24. float cpuCoreRequestAverage = 11;
  25. // CPU usage average in cores
  26. float cpuCoreUsageAverage = 12;
  27. // CPU usage max in cores
  28. float cpuCoreUsageMax = 13;
  29. // RAM usage in byte-hours
  30. int64 ramByteHours = 14;
  31. // RAM request average in bytes
  32. int64 ramBytesRequestAverage = 15;
  33. // RAM usage average in bytes
  34. int64 ramBytesUsageAverage = 16;
  35. // RAM usage max in bytes
  36. int64 ramBytesUsageMax = 17;
  37. // Storage usage in byte-hours
  38. int64 storageByteHours = 18;
  39. // Network transfer bytes sent
  40. int64 networkTransferBytes = 19;
  41. // Network bytes received
  42. int64 networkReceiveBytes = 20;
  43. // Diagnostic information about this resource
  44. optional DiagnosticResult diagnostic = 99;
  45. }