Allow passing of metrics server secret to flagger
An attempt at fixing https://github.com/fluxcd/flagger/issues/1671. I'm not much of a Go wizard, so it probably requires some cleanup.
This adds the ability to add --metrics-server-secret-ref to give the ability to auth against external Prometheus endpoints.
@stefanprodan and chance I can get a review on this please?
is it not possible to define custom MetricTemplate objects pointing to the prom server with the appropriate credentials? the query can be copy pasted from flagger's codebase. that's hardcoded anyway: https://github.com/fluxcd/flagger/blob/main/pkg/metrics/observers/istio.go#L27
@aryan9600 that's what I'm doing as a work around but I'd like the built ins to work as described without having to duplicate code from the repo to get it to work.