8000 Set default values for prometheus service lables and selectors · nginx/kubernetes-ingress@aad352c · GitHub
[go: up one dir, main page]

Skip to content

Commit aad352c

Browse files
committed
Set default values for prometheus service lables and selectors
1 parent 7414ce6 commit aad352c

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

deployments/helm-chart/templates/controller-prometheus-service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ metadata:
1212
spec:
1313
clusterIP: None
1414
ports:
15-
- name: {{ .Values.prometheus.service.endpoint }}
15+
- name: prometheus
1616
protocol: TCP
1717
port: {{ .Values.prometheus.port }}
1818
targetPort: {{ .Values.prometheus.port }}

deployments/helm-chart/values.schema.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,14 +1474,6 @@
14741474
true
14751475
]
14761476
},
1477-
"endpoint": {
1478-
"type": "string",
1479-
"default": "prometheus",
1480-
"title": "The name of the port endpoint",
1481-
"examples": [
1482-
"prometheus"
1483-
]
1484-
},
14851477
"labels": {
14861478
"type": "object",
14871479
"default": {},
@@ -1780,7 +1772,6 @@
17801772
"scheme": "http",
17811773
"service": {
17821774
"create": false,
1783-
"endpoint": "prometheus",
17841775
"labels": {}
17851776
},
17861777
"serviceMonitor": {

deployments/helm-chart/values.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -461,11 +461,8 @@ prometheus:
461461
## Requires prometheus.create=true
462462
create: false
463463

464-
## Name of the endpoint exposed by the service.
465-
## Used by the ServiceMonitor's `endpoints` field to discover service endpoints.
466-
endpoint: "prometheus"
467-
468-
labels: {}
464+
labels:
465+
service: "nginx-ingress-prometheus-service"
469466

470467
serviceMonitor:
471468
## Creates a serviceMonitor to expose statistics on the kubernetes pods.
@@ -475,11 +472,13 @@ prometheus:
475472
labels: {}
476473

477474
## A set of labels to allow the selection of endpoints for the ServiceMonitor.
478-
selectorMatchLabels: {}
475+
selectorMatchLabels:
476+
service: "nginx-ingress-prometheus-service"
479477

480478
## A list of endpoints allowed as part of this ServiceMonitor.
481-
endpoints: []
482-
# - port: prometheus
479+
## Matches on the name of a Service port.
480+
endpoints:
481+
- port: prometheus
483482

484483
serviceInsight:
485484
## Expose NGINX Plus Service Insight endpoint.

0 commit comments

Comments
 (0)
0