- CRD file, and yaml or helm for deployment of your operator
- Create a repo and put your operator files (crd and yaml files or helm repo for deployment) there so that CPE can get them
- If your CR uses its original completion status, you need to add adaptor to CPE (see operator_adaptor.go)
- Create the benchmark operator yaml for your operator (see the below templates)
- Deploy your benchmark operator
- Create Benchmark job file (see the below template)
- Specify your benchmark operator w/ spec.benchmarkOperator.name in your Benchmark file
- Define configuration variables of your benchmark application in benchmarkSpec
- Set the values of the variables that you want to change w/ iterationSpec.iterations
- Deploy your Benchmark job
Define the operator deployment spec and its benchmark or job GVK (group-version-kind)
apiVersion: cpe.cogadvisor.io/v1
kind: BenchmarkOperator
metadata:
name: [BenchmarkOperator name]
namespace: [BenchmarkOperator namespace]
spec:
apiVersion: [benchmark apiVersion]
kind: [benchmark kind]
adaptor: [benchmark adaptor]
crd:
host: [operator crd host for role binding]
paths:
- [operator crd path for role binding]
deploySpec:
namespace: [deploying namespace]
yaml:
host: [host for general deploying yaml]
paths:
- [paths for general deploying yaml]
- Put a deployment yaml of namespace at the beginning of the yaml path list.
- Use one yaml for one resource. The system does not handle multiple resources in the same file.
apiVersion: cpe.cogadvisor.io/v1
kind: BenchmarkOperator
metadata:
name: [operator name]
spec:
apiVersion: [benchmark apiVersion]
kind: [benchmark kind]
adaptor: [benchmark adaptor]
crd:
host: [operator crd host for role binding]
paths:
- [operator crd path for role binding]
deploySpec:
namespace: [deploying namespace]
helm:
entity: [package]
release: [release name]
repoName: [repo name]
url: [helm repo url]
valuesYaml: |
[modified values in YAML format]
To create repo from your git repo: https://blog.softwaremill.com/hosting-helm-private-repository-from-github-ff3fa940d0b7
apiVersion: cpe.cogadvisor.io/v1
kind: Benchmark
metadata:
name: [Benchmark name]
namespace: [Benchmark namespace]
spec:
benchmarkOperator:
name: [BenchmarkOperator name]
namespace: [BenchmarkOperator namespace]
benchmarkSpec: |
[spec will be appended to defined benchmark GVK .spec]
trackBuildConfigs: [build tracker arguments]
iterationSpec: [iteration arguments]
parserKey: [parser arguments]
sidecar: true|false
repetition: [repeating number of run]