Skip to content

Commit 528e70a

Browse files
ivanmatmatioktalz
authored andcommitted
DOC: prometheus access outside pod
1 parent 4863c4c commit 528e70a

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

documentation/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- [Controller options](controller.md)
99
- [Custom resource definitions](custom-resources.md)
1010
- [Annotations](annotations.md)
11+
- [Prometheus](prometheus.md)
1112

1213
#### Experimental
1314
- [Gateway API](gateway-api.md)

documentation/gen/readme.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ var headerREADME = `
2020
- [Controller options](controller.md)
2121
- [Custom resource definitions](custom-resources.md)
2222
- [Annotations](annotations.md)
23+
- [Prometheus](prometheus.md)
2324
2425
#### Experimental
2526
- [Gateway API](gateway-api.md)

documentation/prometheus.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Prometheus
2+
3+
## Activation
4+
5+
To enable prometheus, simply add the `--prometheus` flag to the command line arguments of the ingress controller. This will activate the prometheus endpoints in the ingress controller. Its address is the same as the ingress controller and the path is `/metrics`. The listen port is defined by the option `--controller-port` which is set to 6060 by default. So ,the expected URL is:
6+
```
7+
http(s)://<ingress controller ip address or DNS name>:<controller port>/metrics
8+
```
9+
10+
## Security
11+
12+
You can enable a basic authentication access to restrict the access to the prometheus endpoint. To this aim, create a Secret with the pairs of authorized users and their passwords. These passwords must first have been encrypted with a tool like `mkpasswd`. Example:
13+
```
14+
$ mkpasswd -m SHA-256
15+
```
16+
Then point the controller to this secret by adding the `prometheus-endpoint-auth-secret` data to the controller configmap. Example:
17+
```
18+
prometheus-endpoint-auth-secret: haproxy-controller/prometheus-credentials
19+
```

0 commit comments

Comments
 (0)