Skip to content

Commit

Permalink
BC-8461 fixup service-monitor selector
Browse files Browse the repository at this point in the history
  • Loading branch information
Loki-Afro committed Nov 27, 2024
1 parent 340b59b commit 1e27fe6
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ metadata:
app: api-admin
spec:
selector:
matchExpressions:
- key: app.kubernetes.io/name
operator: in
values:
- api-admin-svc
matchLabels:
app.kubernetes.io/name: api-admin-svc
endpoints:
- path: /metrics
port: api-metrics
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: {{ NAMESPACE }}
labels:
app: api-admin
app.kubernetes.io/name: api-admin-svc
spec:
type: ClusterIP
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: {{ NAMESPACE }}
labels:
app: board-collaboration
app.kubernetes.io/name: board-collaboration-svc
spec:
type: ClusterIP
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ metadata:
app: board-collaboration
spec:
selector:
matchExpressions:
- key: app.kubernetes.io/name
operator: in
values:
- board-collaboration-svc
matchLabels:
app.kubernetes.io/name: board-collaboration-svc
endpoints:
- path: /metrics
port: api-metrics
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ metadata:
app: api
spec:
selector:
matchExpressions:
- key: app.kubernetes.io/name
operator: in
values:
- api-svc
matchLabels:
app.kubernetes.io/name: api-svc
endpoints:
- path: /metrics
port: api-metrics
1 change: 1 addition & 0 deletions ansible/roles/schulcloud-server-core/templates/svc.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: {{ NAMESPACE }}
labels:
app: api
app.kubernetes.io/name: api-svc
spec:
type: ClusterIP
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: {{ NAMESPACE }}
labels:
app: tldraw-server
app.kubernetes.io/name: tldraw-server-svc
spec:
type: ClusterIP
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ metadata:
app: tldraw-server
spec:
selector:
matchExpressions:
- key: app.kubernetes.io/name
operator: in
values:
- tldraw-server-svc
matchLabels:
app.kubernetes.io/name: tldraw-server-svc
endpoints:
- path: /metrics
port: api-metrics
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
tags:
- service

- name: ServiceMonitor
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: svc-monitor.yml.j2
tags:
- prometheus

- name: Deployment
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: api-migration-systems-svc-monitor
namespace: {{ NAMESPACE }}
labels:
app: api
spec:
selector:
matchLabels:
app.kubernetes.io/name: api-migration-systems-svc
endpoints:
- path: /metrics
port: api-metrics
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: {{ NAMESPACE }}
labels:
app: api-migration-systems
app.kubernetes.io/name: api-migration-systems-svc
spec:
type: ClusterIP
ports:
Expand Down

0 comments on commit 1e27fe6

Please sign in to comment.