diff --git a/app/models/manageiq/providers/kubernetes/container_manager.rb b/app/models/manageiq/providers/kubernetes/container_manager.rb index b5a2d31d9b..500ef41047 100644 --- a/app/models/manageiq/providers/kubernetes/container_manager.rb +++ b/app/models/manageiq/providers/kubernetes/container_manager.rb @@ -662,8 +662,9 @@ def self.prometheus_connect(hostname, port, options) credentials = {:token => options[:bearer]} ssl_options = options[:ssl_options] || {:verify_ssl => OpenSSL::SSL::VERIFY_NONE} + http_proxy_uri = options[:http_proxy] || VMDB::Util.http_proxy_uri.to_s prometheus_options = { - :http_proxy_uri => options[:http_proxy] || VMDB::Util.http_proxy_uri.to_s, + :http_proxy_uri => http_proxy_uri.presence, :verify_ssl => ssl_options[:verify_ssl], :ssl_cert_store => ssl_options[:ca_file], } diff --git a/app/models/manageiq/providers/kubernetes/container_manager/metrics_capture/prometheus_client_mixin.rb b/app/models/manageiq/providers/kubernetes/container_manager/metrics_capture/prometheus_client_mixin.rb index 76989becab..249f5c27de 100644 --- a/app/models/manageiq/providers/kubernetes/container_manager/metrics_capture/prometheus_client_mixin.rb +++ b/app/models/manageiq/providers/kubernetes/container_manager/metrics_capture/prometheus_client_mixin.rb @@ -36,7 +36,7 @@ def prometheus_options worker_class = ManageIQ::Providers::Kubernetes::ContainerManager::MetricsCollectorWorker { - :http_proxy_uri => VMDB::Util.http_proxy_uri.to_s, + :http_proxy_uri => VMDB::Util.http_proxy_uri.to_s.presence, :verify_ssl => @ext_management_system.verify_ssl_mode(prometheus_endpoint), :ssl_cert_store => @ext_management_system.ssl_cert_store(prometheus_endpoint), :open_timeout => worker_class.worker_settings[:prometheus_open_timeout] || 5,