Class: Google::Apis::GkehubV1alpha::ConfigManagementContainerResourceRequirements

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

Overview

ResourceRequirements allows to override the CPU and memory resource requirements of a container.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ConfigManagementContainerResourceRequirements

Returns a new instance of ConfigManagementContainerResourceRequirements.



518
519
520
# File 'lib/google/apis/gkehub_v1alpha/classes.rb', line 518

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

Instance Attribute Details

#container_nameString

Name of the container Corresponds to the JSON property containerName

Returns:

  • (String)


502
503
504
# File 'lib/google/apis/gkehub_v1alpha/classes.rb', line 502

def container_name
  @container_name
end

#cpu_limitGoogle::Apis::GkehubV1alpha::ConfigManagementQuantity

The view model of a single quantity, e.g. "800 MiB". Corresponds to https:// github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/ pkg/api/resource/generated.proto Corresponds to the JSON property cpuLimit



509
510
511
# File 'lib/google/apis/gkehub_v1alpha/classes.rb', line 509

def cpu_limit
  @cpu_limit
end

#memory_limitGoogle::Apis::GkehubV1alpha::ConfigManagementQuantity

The view model of a single quantity, e.g. "800 MiB". Corresponds to https:// github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/ pkg/api/resource/generated.proto Corresponds to the JSON property memoryLimit



516
517
518
# File 'lib/google/apis/gkehub_v1alpha/classes.rb', line 516

def memory_limit
  @memory_limit
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



523
524
525
526
527
# File 'lib/google/apis/gkehub_v1alpha/classes.rb', line 523

def update!(**args)
  @container_name = args[:container_name] if args.key?(:container_name)
  @cpu_limit = args[:cpu_limit] if args.key?(:cpu_limit)
  @memory_limit = args[:memory_limit] if args.key?(:memory_limit)
end