Skip to content

Commit

Permalink
Adding service monitor scraping for slurm
Browse files Browse the repository at this point in the history
  • Loading branch information
kincl committed Oct 30, 2023
1 parent 487902c commit cbe08eb
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 4 deletions.
1 change: 1 addition & 0 deletions slurm/manifests/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ resources:
- serviceaccount.yaml
- clusterrolebinding.yaml
- claim.yaml
- servicemonitor.yaml

configMapGenerator:
- name: slurm-conf
Expand Down
4 changes: 3 additions & 1 deletion slurm/manifests/namespace.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: slurm-system
name: slurm-system
labels:
openshift.io/cluster-monitoring: 'true'
7 changes: 4 additions & 3 deletions slurm/manifests/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ spec:
ports:
- port: 6817
name: slurmctld
- port: 6818
name: slurmd
- port: 8080
name: scrape
clusterIP: None
selector:
app: slurm
app: slurm
component: head
42 changes: 42 additions & 0 deletions slurm/manifests/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: slurm
spec:
endpoints:
- interval: 30s
port: scrape
scheme: http
selector:
matchLabels:
app: slurm
component: head
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: prometheus-k8s
subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: openshift-monitoring
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: prometheus-k8s
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: prometheus-k8s
rules:
- verbs:
- get
- list
- watch
apiGroups:
- ''
resources:
- services
- endpoints
- pods

0 comments on commit cbe08eb

Please sign in to comment.