Skip to content

Support setting Prometheus URL with custom path #193

Closed
@Laci21

Description

@Laci21

I installed flagger like this:

helm upgrade -i flagger flagger/flagger \
--namespace=istio-system \
--set metricsServer=http://prometheus.istio-system.svc.cluster.local/prometheus

So I set a custom prometheus server url and the point is that it has a custom path /prometheus at the end. Then I simply tried to do a canary deployment based on the docs which resulted in a 404 Not Found error in this line.
The prometheus server was called on a wrong path. I believe this is because of this line.

The url which is called after this line is executed is

http://prometheus.istio-system.svc.cluster.local/api/v1/query?query=...

instead of

http://prometheus.istio-system.svc.cluster.local/prometheus/api/v1/query?query=...

(Note that /prometheus is the difference.) So basically the custom path provided for the metricsServer Helm value is disregarded.

The issue can be solved right now if a trailing / is provided for the metricsServer Helm value like this:

--set metricsServer=http://prometheus.istio-system.svc.cluster.local/prometheus/

The ideal solution would be though if the url worked without the trailing / as well.

Some more details:
Flagger version: 0.14.0
Kubernetes version: GKE 1.13.6-gke.0
Istio version: 1.1.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions