prometheus

package
v0.0.0-...-2e7c69a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prometheus

type Prometheus struct {
	ReverseProxy *httputil.ReverseProxy
	// contains filtered or unexported fields
}

func New

func New(baseLog *logrus.Entry,
	dbOpenShiftClusters database.OpenShiftClusters,
	dialer proxy.Dialer,
) *Prometheus

func (*Prometheus) Cli

func (p *Prometheus) Cli(ctx context.Context, resourceID string) (*http.Client, error)

func (*Prometheus) Director

func (p *Prometheus) Director(r *http.Request)

Director modifies the request to point to the clusters prometheus instance

func (*Prometheus) GetPrometheusHostAndScheme

func (p *Prometheus) GetPrometheusHostAndScheme() (string, string)

func (*Prometheus) ModifyResponse

func (p *Prometheus) ModifyResponse(r *http.Response) error

ModifyResponse neutralises any proxied response that a browser might render as HTML. The cluster's Prometheus is attacker-controlled: a customer with cluster-admin on their own cluster can make Prometheus return `Content-Type: text/html` carrying inline