Correct annotations in monitoring docs (#9976)

This commit is contained in:
fergusean 2023-05-21 07:08:20 -04:00 committed by GitHub
parent 0cb3dcfd5c
commit 4d57ddb5fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,10 +39,9 @@ This tutorial will show you how to install [Prometheus](https://prometheus.io/)
controller: controller:
metrics: metrics:
enabled: true enabled: true
service: podAnnotations:
annotations: prometheus.io/port: "10254"
prometheus.io/port: "10254" prometheus.io/scrape: "true"
prometheus.io/scrape: "true"
.. ..
``` ```
- If you are **not using helm**, you will have to edit your manifests like this: - If you are **not using helm**, you will have to edit your manifests like this:
@ -50,10 +49,6 @@ This tutorial will show you how to install [Prometheus](https://prometheus.io/)
``` ```
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "10254"
.. ..
spec: spec:
ports: ports:
@ -67,16 +62,20 @@ This tutorial will show you how to install [Prometheus](https://prometheus.io/)
``` ```
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "10254"
.. ..
spec: spec:
ports: template:
- name: prometheus metadata:
containerPort: 10254 annotations:
.. prometheus.io/scrape: "true"
prometheus.io/port: "10254"
spec:
containers:
- name: controller
ports:
- name: prometheus
containerPort: 10254
..
``` ```