mirror of
https://github.com/logos-storage/bittorrent-benchmarks.git
synced 2026-01-02 13:03:13 +00:00
Add workflow template for parsing logs collected by Vector from Kubernetes pods, with semaphore synchronization to prevent concurrent access conflicts. - log-parsing-workflow-template-vector: New workflow template that scales down Vector aggregator to access RWO PVC, parses JSONL logs, then scales aggregator back up - vector-log-parsing-semaphore: ConfigMap semaphore limiting to one log parsing workflow at a time (prevents RWO PVC mount conflicts) - codex-workflows-rbac: Added deployment get/patch/update permissions to executor role (required for scaling Vector aggregator) Signed-off-by: Chrysostomos Nanakos <chris@include.gr>
73 lines
1.9 KiB
YAML
73 lines
1.9 KiB
YAML
# This sets up a service account with the required permissions for running the Codex workflows. For now,
|
|
# this needs to be manually applied to the cluster running Argo before submitting any benchmarking workflows.
|
|
|
|
# The codex-benchmarks namespace needs to exist, as otherwise we can't create the RoleBinding in the proper namespace.
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: codex-benchmarks
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: codex-benchmarks-workflows
|
|
namespace: argo
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: codex-workflows-runner
|
|
rules:
|
|
- apiGroups: [ "" ]
|
|
resources: [ "namespaces", "persistentvolumeclaims", "pods", "services", "secrets" ]
|
|
verbs: [ "*" ]
|
|
|
|
- apiGroups: [ "apps" ]
|
|
resources: [ "deployments", "statefulsets" ]
|
|
verbs: [ "*" ]
|
|
|
|
- apiGroups: [ "batch" ]
|
|
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", "workflows" ]
|
|
verbs: [ "create", "patch", "get", "list" ]
|
|
- apiGroups: [ "apps" ]
|
|
resources: [ "deployments" ]
|
|
verbs: [ "get", "patch", "update" ]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: codex-workflows-runner
|
|
namespace: codex-benchmarks
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: codex-benchmarks-workflows
|
|
namespace: argo
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: codex-workflows-runner
|
|
apiGroup: rbac.authorization.k8s.io
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: codex-workflows-runner-executor
|
|
namespace: argo
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: codex-benchmarks-workflows
|
|
namespace: argo
|
|
roleRef:
|
|
kind: Role
|
|
name: executor
|
|
apiGroup: rbac.authorization.k8s.io |