From c070eaeedeb3afc46eca4203580242af977276fc Mon Sep 17 00:00:00 2001 From: nasark Date: Thu, 18 Jan 2024 11:43:08 -0500 Subject: [PATCH] mount msging config from file --- .../object_definition.rb | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/lib/container_orchestrator/object_definition.rb b/lib/container_orchestrator/object_definition.rb index 1811318cb02..3856e53d930 100644 --- a/lib/container_orchestrator/object_definition.rb +++ b/lib/container_orchestrator/object_definition.rb @@ -41,6 +41,7 @@ def deployment_definition(name) }, :volumeMounts => [ {:name => "database-secret", :readOnly => true, :mountPath => "/run/secrets/postgresql"}, + {:name => "messaging-env-secret", :readOnly => true, :mountPath => "/run/secrets/messaging"}, {:name => "encryption-key", :readOnly => true, :mountPath => "/run/secrets/manageiq/application"}, ] }], @@ -58,6 +59,32 @@ def deployment_definition(name) ], } }, + { + :name => "messaging-env-secret", + :projected => { + :sources => [ + { + :secret => { + :name => "messaging-env-secret", + :items => [ + {:key => "hostname", :path => "MESSAGING_HOSTNAME"}, + {:key => "username", :path => "MESSAGING_USERNAME"}, + {:key => "port", :path => "MESSAGING_PORT"}, + {:key => "sasl_mechanism", :path => "MESSAGING_SASL_MECHANISM"}, + ], + } + }, + { + :secret => { + :name => "#{ENV["APP_NAME"]}-kafka-admin", + :items => [ + {:key => "password", :path => "MESSAGING_PASSWORD"}, + ], + } + }, + ] + } + }, { :name => "encryption-key", :secret => {