Skip to content

Commit

Permalink
service/registry matching (BUG: last port only)
Browse files Browse the repository at this point in the history
  • Loading branch information
cben committed Jul 13, 2017
1 parent 3a0f568 commit f268f30
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -491,11 +491,18 @@ def get_endpoints_and_services_graph(inv)

h[:container_project] = lazy_find_project(:name => h[:namespace]) # TODO: untested?

# TODO: with multiple ports, how can I match any of them to known registries,
# like https://github.com/ManageIQ/manageiq-providers-kubernetes/pull/57 ?
if h[:container_service_port_configs].any?
registry_port = h[:container_service_port_configs].last[:port]
h[:container_image_registry] = lazy_find_image_registry(
:host => h[:portal_ip], :port => registry_port
)
end

custom_attrs = h.extract!(:labels, :selector_parts)
children = h.extract!(:container_service_port_configs)

_container_image_registry = h.delete(:container_image_registry) # TODO: derive from container_service_port_configs

h[:container_groups] = cgs_by_namespace_and_name.fetch_path(h[:namespace], h[:name])

h.except!(:tags)
Expand Down

0 comments on commit f268f30

Please sign in to comment.