Skip to content
Snippets Groups Projects
Commit 3246c489 authored by Frederic Branczyk's avatar Frederic Branczyk
Browse files

prometheus: Add ability to whitelist Kubernetes labels

parent 4c77a9db
No related branches found
No related tags found
No related merge requests found
kind: Service kind: Service
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: example-app name: example-app
labels: labels:
tier: frontend tier: frontend
namespace: default namespace: default
spec: spec:
selector: selector:
app: example-app app: example-app
ports: ports:
- name: web - name: web
protocol: TCP protocol: TCP
......
...@@ -9,6 +9,8 @@ spec: ...@@ -9,6 +9,8 @@ spec:
selector: selector:
matchLabels: matchLabels:
tier: frontend tier: frontend
targetLabels:
- tier
endpoints: endpoints:
- port: web - port: web
interval: 10s interval: 10s
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment