/
minicluster.yaml
executable file
·47 lines (38 loc) · 1.45 KB
/
minicluster.yaml
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
apiVersion: flux-framework.org/v1alpha1
kind: MiniCluster
metadata:
name: flux-sample
namespace: flux-operator
spec:
size: 2
# If we don't set this, we won't be able to go above two!
maxSize: 10
# Interactive will start the broker to shell into
interactive: true
# This is a list because a pod can support multiple containers
containers:
- image: ghcr.io/rse-ops/singularity:tag-mamba
workingDir: /data
# You can shell in to connect to the broker and issue commands that use CPU
command: sleep infinity
# These are volume mounts for the container for config / secrets we've created separately
# They are only needed by the leader broker, but per the indexed job, we add to all pods
# This would be a good usecase for JobSet if we ever decide to switch
# This is an existing secret that we will mount into /etc/certs
existingVolumes:
certs:
path: /etc/certs
secretName: certs
# Important! We need to have resource requests for the horizonal autoscaler
# The Flux Operator doesn't know you want to use it, so it's up to you
# to provide these if your metric is about CPU
resources:
limits:
cpu: "1"
requests:
cpu: "1"
# Install the metrics exporter, ensuring it's installed to the Flux user space
commands:
pre: python3 -m pip install flux-metrics-api
fluxUser:
name: fluxuser