-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
88 lines (82 loc) · 3.74 KB
/
Copy pathconfig.yaml
File metadata and controls
88 lines (82 loc) · 3.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Example squarepeg config file.
#
# Copy to one of the locations squarepeg resolves config from (highest to
# lowest precedence):
# 1. --config PATH (repeatable, layered left-to-right)
# 2. $SQUAREPEG_CONFIG (colon-separated list of paths, left-to-right)
# 3. ~/.config/squarepeg/config.yaml (the single default location)
# Individual CLI flags always win over all of these.
#
# Every section below is optional; a real config only needs the parts you
# want to set. See README.md for the full precedence/layering explanation.
#
# Any string value anywhere below can reference an environment variable:
# ${VAR} -- substitutes $VAR; error if unset
# ${VAR:-default} -- substitutes $VAR if set and non-empty, else 'default'
# See the "Environment variable references" section of README.md for the
# full semantics (including the bash-compatible empty-string-counts-as-unset
# behaviour of ':-', and why config show/--dry-run may print secrets).
# ── tool-level settings ────────────────────────────────────────────────
namespace: "${SQUAREPEG_NAMESPACE:-my-namespace}"
mode: pod # pod | job
cleanup: true # false behaves as if --keep were always passed
timeout: 300 # seconds to wait for the container to start
quiet: false
allow_host_path_mounts: false
split_streams: false
orphan_sweep: true # also delete YOUR OWN leftovers from crashed previous runs
# (finished-but-undeleted, or stuck forever on a bad image)
orphan_sweep_min_age: 300 # seconds a leftover must be finished/stuck before it's eligible
# applied unless the equivalent CLI flag is given
defaults:
cpus: "1"
memory: 2g # docker units here, same as --memory
image_pull_policy: IfNotPresent
workdir: /work
env:
TZ: Europe/London
# named volumes. Two behaviours, gated by the presence of 'mount_path':
# - no mount_path: available for a user to reference with -v NAME:/mount/path
# - with mount_path: mounted automatically on EVERY run, no -v needed at all
volumes:
scratch:
emptyDir: {sizeLimit: 10Gi} # only mounted if the user does -v scratch:/x
refdata:
persistentVolumeClaim: {claimName: "${REFDATA_PVC}", readOnly: true}
shared-tools: # auto-mounted at /opt/tools on every run
persistentVolumeClaim: {claimName: shared-tools-pvc, readOnly: true}
mount_path: /opt/tools
read_only: true
# arbitrary k8s passthrough, merged into the generated manifest.
# `spec` here is ALWAYS a pod spec, even in --mode job -- squarepeg re-homes
# it under the Job's pod template, so the same config works in either mode.
kubernetes:
metadata:
labels: {team: bioinf}
annotations: {"example.org/cost-centre": "abc"}
spec:
serviceAccountName: "${SERVICE_ACCOUNT:-squarepeg}"
nodeSelector: {"kubernetes.io/arch": amd64}
tolerations:
- {key: dedicated, operator: Equal, value: batch, effect: NoSchedule}
imagePullSecrets:
- {name: "${REGISTRY_SECRET:-regcred}"}
securityContext: {runAsNonRoot: true, fsGroup: 1000}
containers:
- name: main # matched by name; merges into squarepeg's container
securityContext: {allowPrivilegeEscalation: false}
# Job-level settings only; ignored in --mode pod
job:
spec:
backoffLimit: 0
ttlSecondsAfterFinished: 3600
# selected with --profile NAME; deep-merges over the rest of this config
profiles:
gpu:
defaults: {cpus: "8", memory: 32g}
kubernetes:
spec:
nodeSelector: {"nvidia.com/gpu.present": "true"}
containers:
- name: main
resources: {limits: {"nvidia.com/gpu": 1}}