Class: UffizziCore::ComposeFile::Parsers::IngressParserService

Inherits:
Object
  • Object
show all
Defined in:
app/services/uffizzi_core/compose_file/parsers/ingress_parser_service.rb

Class Method Summary collapse

Class Method Details

.parse(ingress_data, services_data) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/services/uffizzi_core/compose_file/parsers/ingress_parser_service.rb', line 5

def parse(ingress_data, services_data)
  raise UffizziCore::ComposeFile::ParseError, I18n.t('compose.no_ingress') if ingress_data.nil?

  container_name = container_name(ingress_data, services_data)
  port = port(ingress_data)
  additional_attributes = build_additional_attributes(ingress_data, services_data)

  {
    container_name: container_name,
    port: port,
  }.merge(additional_attributes)
end