From 14c3c68bf87242f08fc0771c3bca86662e70ed08 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Wed, 25 Sep 2024 15:21:46 -0400 Subject: [PATCH] Fix k8s deployment marshal error with EMS workers The `.ems_id_from_queue_name` method returns an integer and all env var values have to be strings. --- app/models/miq_worker/deployment_per_worker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/miq_worker/deployment_per_worker.rb b/app/models/miq_worker/deployment_per_worker.rb index 612ec90e0da..76928563cee 100644 --- a/app/models/miq_worker/deployment_per_worker.rb +++ b/app/models/miq_worker/deployment_per_worker.rb @@ -5,7 +5,7 @@ module DeploymentPerWorker def create_container_objects ContainerOrchestrator.new.create_deployment(worker_deployment_name) do |definition| configure_worker_deployment(definition, 1) - definition[:spec][:template][:spec][:containers].first[:env] << {:name => "EMS_ID", :value => self.class.ems_id_from_queue_name(queue_name)} + definition[:spec][:template][:spec][:containers].first[:env] << {:name => "EMS_ID", :value => self.class.ems_id_from_queue_name(queue_name).to_s} end end