Allow access to Prometheus in OpenShift via SA token

Fixes: https://github.com/fluxcd/flagger/issues/1064

Signed-off-by: Wallace Wadge <wwadge@gmail.com>
This commit is contained in:
Wallace Wadge
2023-01-18 08:56:53 +01:00
committed by Wallace Wadge
parent 58270dd4b9
commit a50d7de86d
3 changed files with 81 additions and 13 deletions
+14 -2
View File
@@ -184,13 +184,25 @@ as the `MetricTemplate` with the basic-auth credentials:
apiVersion: v1
kind: Secret
metadata:
name: prom-basic-auth
name: prom-auth
namespace: flagger
data:
username: your-user
password: your-password
```
or if you require bearer token authentication (via a SA token):
```yaml
apiVersion: v1
kind: Secret
metadata:
name: prom-auth
namespace: flagger
data:
token: ey1234...
```
Then reference the secret in the `MetricTemplate`:
```yaml
@@ -204,7 +216,7 @@ spec:
type: prometheus
address: http://prometheus.monitoring:9090
secretRef:
name: prom-basic-auth
name: prom-auth
```
## Datadog