Merge pull request #1338 from wwadge/add-prometheus-bearer-auth

Allow access to Prometheus in OpenShift via SA token
This commit is contained in:
Sanskar Jaiswal
2023-01-18 19:32:49 +05:30
committed by GitHub
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