Enable nginx ingress metrics

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2021-11-28 11:38:35 +00:00
parent 45d8fc0328
commit 53f5a5c062
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78

View File

@ -89,6 +89,9 @@ spec:
labels: labels:
app.kubernetes.io/name: ingress-nginx app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx app.kubernetes.io/part-of: ingress-nginx
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "http-metrics"
spec: spec:
containers: containers:
- args: - args:
@ -100,6 +103,7 @@ spec:
- --udp-services-configmap=$(POD_NAMESPACE)/ingress-nginx-udp-services - --udp-services-configmap=$(POD_NAMESPACE)/ingress-nginx-udp-services
- --annotations-prefix=nginx.ingress.kubernetes.io - --annotations-prefix=nginx.ingress.kubernetes.io
- --watch-ingress-without-class - --watch-ingress-without-class
- --enable-metrics
env: env:
- name: POD_NAME - name: POD_NAME
valueFrom: valueFrom:
@ -113,16 +117,6 @@ spec:
fieldPath: metadata.namespace fieldPath: metadata.namespace
image: k8s.gcr.io/ingress-nginx/controller:v1.0.0-beta.1 image: k8s.gcr.io/ingress-nginx/controller:v1.0.0-beta.1
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: 10254
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
name: nginx-ingress-controller name: nginx-ingress-controller
ports: ports:
- containerPort: 80 - containerPort: 80
@ -133,6 +127,19 @@ spec:
hostPort: 443 hostPort: 443
name: https name: https
protocol: TCP protocol: TCP
- containerPort: 10254
name: http-metrics
protocol: TCP
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: 10254
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
readinessProbe: readinessProbe:
failureThreshold: 3 failureThreshold: 3
httpGet: httpGet: