Class: Pangea::Kubernetes::Types::LoadBalancerConfig

Inherits:
Resources::BaseAttributes
  • Object
show all
Defined in:
lib/pangea/kubernetes/types.rb

Overview

Load balancer configuration for elastic LB tier

Instance Method Summary collapse

Instance Method Details

#bare_metal?Boolean

Returns:

  • (Boolean)


496
497
498
# File 'lib/pangea/kubernetes/types.rb', line 496

def bare_metal?
  mode == 'haproxy-bird'
end

#to_hObject



500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
# File 'lib/pangea/kubernetes/types.rb', line 500

def to_h
  hash = {
    mode: mode,
    instance_count: instance_count,
    instance_type: instance_type,
    region: region,
    backends: backends,
    health_check_interval: health_check_interval,
    max_connections: max_connections,
    frontend_ports: frontend_ports
  }
  hash[:tags] = tags if tags.any?
  hash[:bgp_asn] = bgp_asn if bgp_asn
  hash[:bgp_neighbor] = bgp_neighbor if bgp_neighbor
  hash[:vrrp_interface] = vrrp_interface if vrrp_interface
  hash[:virtual_ips] = virtual_ips if virtual_ips.any?
  hash
end