Skip to content

Commit

Permalink
Updating Slurm config
Browse files Browse the repository at this point in the history
  • Loading branch information
kincl committed Nov 9, 2023
1 parent e6a5fc0 commit 2a534a8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
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
- priorityclass.yaml

- servicemonitor.yaml
- scaledobject.yaml
Expand Down
7 changes: 7 additions & 0 deletions slurm/manifests/priorityclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: high-priority-batch
value: 1000000
globalDefault: false
description: "This priority class should be used for high priority batch pods only."
22 changes: 21 additions & 1 deletion slurm/manifests/statefulset-compute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ spec:
app: slurm
component: compute
spec:
priorityClassName: high-priority-batch
automountServiceAccountToken: false
shareProcessNamespace: true
dnsConfig:
Expand All @@ -43,6 +44,20 @@ spec:
enableServiceLinks: false
terminationGracePeriodSeconds: 15
serviceAccountName: slurm
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- slurm
- key: component
operator: In
values:
- compute
topologyKey: "kubernetes.io/hostname"
initContainers:
- name: fix-munge-paths
image: ghcr.io/naps-product-sa/openshift-batch/munge:latest
Expand Down Expand Up @@ -74,7 +89,12 @@ spec:
- /bin/bash
- -c
- |
scontrol update nodename=$HOSTNAME state=down reason=shutdown
scontrol delete nodename=$HOSTNAME
resources:
requests:
cpu: 3
limits:
cpu: 3
securityContext:
runAsUser: 0
runAsGroup: 0
Expand Down

0 comments on commit 2a534a8

Please sign in to comment.