Class: Google::Apis::RunV2::GoogleCloudRunV2ResourceRequirements
- Inherits:
-
Object
- Object
- Google::Apis::RunV2::GoogleCloudRunV2ResourceRequirements
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/run_v2/classes.rb,
lib/google/apis/run_v2/representations.rb,
lib/google/apis/run_v2/representations.rb
Overview
ResourceRequirements describes the compute resource requirements.
Instance Attribute Summary collapse
-
#cpu_idle ⇒ Boolean
(also: #cpu_idle?)
Determines whether CPU should be throttled or not outside of requests.
-
#limits ⇒ Hash<String,String>
Only memory and CPU are supported.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRunV2ResourceRequirements
constructor
A new instance of GoogleCloudRunV2ResourceRequirements.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRunV2ResourceRequirements
Returns a new instance of GoogleCloudRunV2ResourceRequirements.
397 398 399 |
# File 'lib/google/apis/run_v2/classes.rb', line 397 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cpu_idle ⇒ Boolean Also known as: cpu_idle?
Determines whether CPU should be throttled or not outside of requests.
Corresponds to the JSON property cpuIdle
385 386 387 |
# File 'lib/google/apis/run_v2/classes.rb', line 385 def cpu_idle @cpu_idle end |
#limits ⇒ Hash<String,String>
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. 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
395 396 397 |
# File 'lib/google/apis/run_v2/classes.rb', line 395 def limits @limits end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
402 403 404 405 |
# File 'lib/google/apis/run_v2/classes.rb', line 402 def update!(**args) @cpu_idle = args[:cpu_idle] if args.key?(:cpu_idle) @limits = args[:limits] if args.key?(:limits) end |