Class: Google::Apis::RunV2::GoogleCloudRunV2ResourceRequirements

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRunV2ResourceRequirements

Returns a new instance of GoogleCloudRunV2ResourceRequirements.



1114
1115
1116
# File 'lib/google/apis/run_v2/classes.rb', line 1114

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#cpu_idleBoolean Also known as: cpu_idle?

Determines whether CPU should be throttled or not outside of requests. Corresponds to the JSON property cpuIdle

Returns:

  • (Boolean)


1102
1103
1104
# File 'lib/google/apis/run_v2/classes.rb', line 1102

def cpu_idle
  @cpu_idle
end

#limitsHash<String,String>

Only memory and CPU are supported. Note: The only supported values for CPU are '1', '2', '4', and '8'. 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

Returns:

  • (Hash<String,String>)


1112
1113
1114
# File 'lib/google/apis/run_v2/classes.rb', line 1112

def limits
  @limits
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1119
1120
1121
1122
# File 'lib/google/apis/run_v2/classes.rb', line 1119

def update!(**args)
  @cpu_idle = args[:cpu_idle] if args.key?(:cpu_idle)
  @limits = args[:limits] if args.key?(:limits)
end