Class: Google::Cloud::Run::V2::ResourceRequirements
- Inherits:
-
Object
- Object
- Google::Cloud::Run::V2::ResourceRequirements
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/run/v2/k8s.min.rb
Overview
ResourceRequirements describes the compute resource requirements.
Defined Under Namespace
Classes: LimitsEntry
Instance Attribute Summary collapse
-
#cpu_idle ⇒ ::Boolean
Determines whether CPU is only allocated during requests (true by default).
-
#limits ⇒ ::Google::Protobuf::Map{::String => ::String}
Only
memory,cpuandnvidia.com/gpukeys in the map are supported. -
#startup_cpu_boost ⇒ ::Boolean
Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency.
Instance Attribute Details
#cpu_idle ⇒ ::Boolean
Returns Determines whether CPU is only allocated during requests (true by default). However, if ResourceRequirements is set, the caller must explicitly set this field to true to preserve the default behavior.
120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'proto_docs/google/cloud/run/v2/k8s.min.rb', line 120 class ResourceRequirements include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#limits ⇒ ::Google::Protobuf::Map{::String => ::String}
Returns Only memory, cpu and nvidia.com/gpu keys in the map are supported.
Notes:
- The only supported values for CPU are '1', '2', '4', and '8'. Setting 4
CPU requires at least 2Gi of memory. For more information, go to
https://cloud.google.com/run/docs/configuring/cpu.
- For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits
- The only supported 'nvidia.com/gpu' value is '1'.
120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'proto_docs/google/cloud/run/v2/k8s.min.rb', line 120 class ResourceRequirements include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#startup_cpu_boost ⇒ ::Boolean
Returns Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency.
120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'proto_docs/google/cloud/run/v2/k8s.min.rb', line 120 class ResourceRequirements include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |