Class: KubeDSL::DSL::Autoscaling::V2::HorizontalPodAutoscalerSpec

Inherits:
KubeDSL::DSLObject show all
Defined in:
lib/kube-dsl/dsl/autoscaling/v2/horizontal_pod_autoscaler_spec.rb

Instance Method Summary collapse

Methods inherited from KubeDSL::DSLObject

#initialize, #to_resource

Methods included from ValueFields

extended

Methods included from Validations

extended

Constructor Details

This class inherits a constructor from KubeDSL::DSLObject

Instance Method Details

#kind_symObject



30
31
32
# File 'lib/kube-dsl/dsl/autoscaling/v2/horizontal_pod_autoscaler_spec.rb', line 30

def kind_sym
  :horizontal_pod_autoscaler_spec
end

#serializeObject



20
21
22
23
24
25
26
27
28
# File 'lib/kube-dsl/dsl/autoscaling/v2/horizontal_pod_autoscaler_spec.rb', line 20

def serialize
  {}.tap do |result|
    result[:behavior] = behavior.serialize
    result[:maxReplicas] = max_replicas
    result[:metrics] = metrics.map(&:serialize)
    result[:minReplicas] = min_replicas
    result[:scaleTargetRef] = scale_target_ref.serialize
  end
end