Skip to content

Commit

Permalink
Merge pull request #522 from agrare/fix_prometheus_proxy_host
Browse files Browse the repository at this point in the history
Fix prometheus http_proxy using 0.0.0.0:80

(cherry picked from commit 22d854f)
  • Loading branch information
Fryguy committed Mar 5, 2024
1 parent 7e76622 commit 2b36948
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -666,8 +666,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],
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2b36948

Please sign in to comment.