diff --git a/app/models/miq_worker/service_worker.rb b/app/models/miq_worker/service_worker.rb index 8f61d577952..1bf1dbaa8a6 100644 --- a/app/models/miq_worker/service_worker.rb +++ b/app/models/miq_worker/service_worker.rb @@ -7,11 +7,9 @@ module ServiceWorker def create_container_objects orchestrator = ContainerOrchestrator.new - orchestrator.create_service(service_name, service_label, SERVICE_PORT) orchestrator.create_deployment(worker_deployment_name) do |definition| configure_worker_deployment(definition) - definition[:spec][:serviceName] = service_name definition[:spec][:template][:metadata][:labels].merge!(service_label) container = definition[:spec][:template][:spec][:containers].first @@ -42,11 +40,7 @@ def add_readiness_probe(container_definition) end def service_label - {:service => service_name} - end - - def service_name - worker_deployment_name.delete_prefix(deployment_prefix) + {:service => worker_deployment_name.delete_prefix(deployment_prefix)} end # Can be overriden by including classes