Class: Google::Apis::RunV1alpha1::ResourceRequirements

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/run_v1alpha1/classes.rb,
lib/google/apis/run_v1alpha1/representations.rb,
lib/google/apis/run_v1alpha1/representations.rb

Overview

ResourceRequirements describes the compute resource requirements.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ResourceRequirements

Returns a new instance of ResourceRequirements.



1563
1564
1565
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1563

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

Instance Attribute Details

#limitsHash<String,String>

(Optional) Only memory and CPU are 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

Returns:

  • (Hash<String,String>)


1551
1552
1553
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1551

def limits
  @limits
end

#requestsHash<String,String>

(Optional) Only memory and CPU are 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

Returns:

  • (Hash<String,String>)


1561
1562
1563
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1561

def requests
  @requests
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1568
1569
1570
1571
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 1568

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