summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/api/core/v1/resource.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/k8s.io/api/core/v1/resource.go')
-rw-r--r--vendor/k8s.io/api/core/v1/resource.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/vendor/k8s.io/api/core/v1/resource.go b/vendor/k8s.io/api/core/v1/resource.go
index bb8041254..5bc9cd5bf 100644
--- a/vendor/k8s.io/api/core/v1/resource.go
+++ b/vendor/k8s.io/api/core/v1/resource.go
@@ -41,6 +41,14 @@ func (self *ResourceList) Memory() *resource.Quantity {
return &resource.Quantity{Format: resource.BinarySI}
}
+// Returns the Storage limit if specified.
+func (self *ResourceList) Storage() *resource.Quantity {
+ if val, ok := (*self)[ResourceStorage]; ok {
+ return &val
+ }
+ return &resource.Quantity{Format: resource.BinarySI}
+}
+
func (self *ResourceList) Pods() *resource.Quantity {
if val, ok := (*self)[ResourcePods]; ok {
return &val