storage.proto 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. // Volume represents a persistent volume (provisioned resource)
  7. message Volume {
  8. // Identification
  9. string ID = 1;
  10. string clusterID = 2;
  11. // Properties
  12. string name = 3;
  13. string storageClass = 4;
  14. map<string, string> labels = 5;
  15. map<string, string> annotations = 6;
  16. // Resource lifecycle (only when different from cluster window)
  17. optional google.protobuf.Timestamp creationTime = 7;
  18. optional google.protobuf.Timestamp deletionTime = 8;
  19. // Usage metrics
  20. // Storage capacity in bytes
  21. int64 capacityBytes = 9;
  22. // Diagnostic information about this resource
  23. optional DiagnosticResult diagnostic = 99;
  24. }
  25. // PersistentVolumeClaim represents a PVC (allocated resource) that refers to a Volume
  26. message PersistentVolumeClaim {
  27. // Identification
  28. string ID = 1;
  29. string namespaceID = 2;
  30. optional string volumeID = 3;
  31. optional string podID = 4;
  32. // Properties
  33. string name = 5;
  34. string storageClass = 6;
  35. map<string, string> labels = 7;
  36. map<string, string> annotations = 8;
  37. // Resource lifecycle (only when different from cluster window)
  38. optional google.protobuf.Timestamp creationTime = 9;
  39. optional google.protobuf.Timestamp deletionTime = 10;
  40. // Usage metrics
  41. // Storage usage in byte-hours
  42. int64 storageByteHours = 11;
  43. // Requested storage capacity in bytes
  44. int64 requestedBytes = 12;
  45. // Diagnostic information about this resource
  46. optional DiagnosticResult diagnostic = 99;
  47. }