Skip to content

Commit

Permalink
fix: production values for Argo workflows and RBAC
Browse files Browse the repository at this point in the history
  • Loading branch information
gmega committed Jan 22, 2025
1 parent 538f7a7 commit d70b87d
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 7 deletions.
11 changes: 11 additions & 0 deletions k8s/argo-workflows/codex-workflows-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ rules:
resources: [ "jobs" ]
verbs: [ "*" ]
---
# This role already exists with the default Argo installer, but it might be missing, so we add it here as well.
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: executor
namespace: argo
rules:
- apiGroups: [ "argoproj.io" ]
resources: [ "workflowtaskresults" ]
verbs: [ "create", "patch" ]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
Expand Down
20 changes: 13 additions & 7 deletions k8s/argo-workflows/deluge-benchmark-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
- name: constrained__networkSize_seeders
value: "[[2, 1], [8, [1, 2, 4]], [16, [1, 2, 4, 8]], [32, [1, 2, 4, 8, 16]]]"
- name: minikubeEnv
value: "true"
value: "false"
- name: maxExperimentDuration
value: 144h

Expand Down Expand Up @@ -79,11 +79,11 @@ spec:
command: ["sh", "-c"]
source: |
if [ "{{workflow.parameters.minikubeEnv}}" == "true"]; then
echo "codexstorage/bittorrent-benchmarks-workflows:latest" > /tmp/image.txt
echo "Always" > /tmp/imagePullPolicy.txt
else
echo "bittorrent-benchmarks-workflows:minikube" > /tmp/image.txt
echo "Never" > /tmp/imagePullPolicy.txt
else
echo "codexstorage/bittorrent-benchmarks-workflows:latest" > /tmp/image.txt
echo "Always" > /tmp/imagePullPolicy.txt
fi
outputs:
parameters:
Expand Down Expand Up @@ -237,15 +237,21 @@ spec:
imagePullPolicy: '{{inputs.parameters.imagePullPolicy}}'
command: [ "/bin/bash" ]
source: |
set -e
if [[ "{{workflow.parameters.minikubeEnv}}" == "false" ]]; then
echo "Using devnet cluster values for deploy."
VALUE_FILE=(-f "./k8s/clusters/devnet/deluge-chart-values.yaml")
fi
helm install e{{inputs.parameters.runId}} ./k8s/charts/deluge\
--namespace codex-benchmarks\
--namespace codex-benchmarks "${VALUE_FILE[@]}"\
--set experiment.groupId=g{{inputs.parameters.groupId}}\
--set experiment.repetitions={{inputs.parameters.repetitions}}\
--set experiment.fileSize={{inputs.parameters.fileSize}}\
--set experiment.networkSize={{inputs.parameters.networkSize}}\
--set experiment.seeders={{inputs.parameters.seeders}}\
--set experiment.seederSets={{inputs.parameters.seederSets}}\
--set deployment.minikubeEnv={{workflow.parameters.minikubeEnv}}
--set experiment.seederSets={{inputs.parameters.seederSets}}
- name: wait-for-experiment
inputs:
Expand Down
33 changes: 33 additions & 0 deletions k8s/clusters/devnet/deluge-chart-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
experiment:
networkSize: 5
fileSize: "100MB"
seeders: 1
seederSets: 1
repetitions: 2

# Experiments are ran as part of groups which may entail several invocations for this Helm chart.
# We therefore identify both the experiment within a group, and the group itself.

# Identifies the experiment within the group. If left empty, defaults to the release name.
id: ""
# Identifies the experiment group. Needs to be defined by the user.
groupId: ""

testRunner: true

deployment:
appName: ""

# If false, Deluge nodes will not be allowed to run on the same node.
allowColocation: false
minikubeEnv: false

# Labels for setting deluge node affinity towards a node pool.
delugeNodePool:
workload-type: "benchmarks"

trackerNodePool:
workload-type: "benchmarks"

runnerNodePool:
workload-type: "benchmarks"

0 comments on commit d70b87d

Please sign in to comment.