Documentation
¶
Index ¶
- type Prometheus
- func (p *Prometheus) Cli(ctx context.Context, resourceID string) (*http.Client, error)
- func (p *Prometheus) Director(r *http.Request)
- func (p *Prometheus) GetPrometheusHostAndScheme() (string, string)
- func (p *Prometheus) ModifyResponse(r *http.Response) error
- func (p *Prometheus) RoundTripper(r *http.Request) (*http.Response, error)
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) 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