Class: Google::Apis::RunV1::ResourceRequirements
- Inherits:
-
Object
- Object
- Google::Apis::RunV1::ResourceRequirements
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/run_v1/classes.rb,
lib/google/apis/run_v1/representations.rb,
lib/google/apis/run_v1/representations.rb
Overview
ResourceRequirements describes the compute resource requirements.
Instance Attribute Summary collapse
-
#limits ⇒ Hash<String,String>
(Optional) Cloud Run fully managed: Only memory and CPU are supported.
-
#requests ⇒ Hash<String,String>
(Optional) Cloud Run fully managed: Only memory and CPU are supported.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ResourceRequirements
constructor
A new instance of ResourceRequirements.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ResourceRequirements
Returns a new instance of ResourceRequirements.
2011 2012 2013 |
# File 'lib/google/apis/run_v1/classes.rb', line 2011 def initialize(**args) update!(**args) end |
Instance Attribute Details
#limits ⇒ Hash<String,String>
(Optional) Cloud Run fully managed: Only memory and CPU are supported. Note:
The only supported values for CPU are '1', '2', and '4'. Setting 4 CPU
requires at least 2Gi of memory. Cloud Run for Anthos: supported Limits
describes the maximum amount of compute resources allowed. The values of the
map is string form of the 'quantity' k8s type: https://github.com/kubernetes/
kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/
quantity.go
Corresponds to the JSON property limits
1997 1998 1999 |
# File 'lib/google/apis/run_v1/classes.rb', line 1997 def limits @limits end |
#requests ⇒ Hash<String,String>
(Optional) Cloud Run fully managed: Only memory and CPU are supported. Note:
The only supported values for CPU are '1' and '2'. Cloud Run for Anthos:
supported Requests describes the minimum amount of compute resources required.
If Requests is omitted for a container, it defaults to Limits if that is
explicitly specified, otherwise to an implementation-defined value. The values
of the map is string form of the 'quantity' k8s type: https://github.com/
kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/
resource/quantity.go
Corresponds to the JSON property requests
2009 2010 2011 |
# File 'lib/google/apis/run_v1/classes.rb', line 2009 def requests @requests end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2016 2017 2018 2019 |
# File 'lib/google/apis/run_v1/classes.rb', line 2016 def update!(**args) @limits = args[:limits] if args.key?(:limits) @requests = args[:requests] if args.key?(:requests) end |