diff --git a/lib/manageiq/providers/workflows/engine.rb b/lib/manageiq/providers/workflows/engine.rb index f6cecac..36919fc 100644 --- a/lib/manageiq/providers/workflows/engine.rb +++ b/lib/manageiq/providers/workflows/engine.rb @@ -42,12 +42,15 @@ def self.floe_docker_runner host = ENV.fetch("KUBERNETES_SERVICE_HOST") port = ENV.fetch("KUBERNETES_SERVICE_PORT") - Floe::Workflow::Runner::Kubernetes.new( - "server" => URI::HTTPS.build(:host => host, :port => port).to_s, - "token_file" => "/run/secrets/kubernetes.io/serviceaccount/token", - "ca_cert" => "/run/secrets/kubernetes.io/serviceaccount/ca.crt", - "namespace" => File.read("/run/secrets/kubernetes.io/serviceaccount/namespace") - ) + options = { + "server" => URI::HTTPS.build(:host => host, :port => port).to_s, + "token_file" => "/run/secrets/kubernetes.io/serviceaccount/token", + "ca_cert" => "/run/secrets/kubernetes.io/serviceaccount/ca.crt", + "namespace" => File.read("/run/secrets/kubernetes.io/serviceaccount/namespace"), + "task_service_account" => ENV.fetch("AUTOMATION_JOB_SERVICE_ACCOUNT") + } + + Floe::Workflow::Runner::Kubernetes.new(options) elsif MiqEnvironment::Command.is_appliance? || MiqEnvironment::Command.supports_command?("podman") options = {} if Rails.env.production? diff --git a/manageiq-providers-workflows.gemspec b/manageiq-providers-workflows.gemspec index 83f3fd2..7af7143 100644 --- a/manageiq-providers-workflows.gemspec +++ b/manageiq-providers-workflows.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.add_dependency "floe", "~> 0.4.1" + spec.add_dependency "floe", "~> 0.5.0" spec.add_development_dependency "manageiq-style" spec.add_development_dependency "simplecov", ">= 0.21.2"