Skip to content

Commit

Permalink
Add base of benchmark operator dashboard (#2430)
Browse files Browse the repository at this point in the history
* 📈 Add base of benchmark operator dashboard

Signed-off-by: vankichi <[email protected]>

* 💚 Fix build benchmark images trigger

Signed-off-by: vankichi <[email protected]>

* 💚 Add info tag for info metrics

Signed-off-by: vankichi <[email protected]>

* 📈 showing job image and tags

Signed-off-by: vankichi <[email protected]>

* 📈 add bench job status

Signed-off-by: vankichi <[email protected]>

* ♻️ Update dashboard and rename

Signed-off-by: vankichi <[email protected]>

* ♻️ Fix

Signed-off-by: vankichi <[email protected]>

* Update internal/observability/metrics/tools/benchmark/benchmark.go

Co-authored-by: Hiroto Funakoshi <[email protected]>
Signed-off-by: Kiichiro YUKAWA <[email protected]>

---------

Signed-off-by: vankichi <[email protected]>
Signed-off-by: Kiichiro YUKAWA <[email protected]>
Co-authored-by: Hiroto Funakoshi <[email protected]>
  • Loading branch information
vankichi and hlts2 authored Mar 15, 2024
1 parent 6a3bd2e commit 56cddd0
Show file tree
Hide file tree
Showing 15 changed files with 2,741 additions and 51 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/dockers-benchmark-job-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ on:
- "!internal/**/*_test.go"
- "!internal/db/**"
- "apis/grpc/**"
- "pkg/benchmark/operator/**"
- "cmd/benchmark/operator/**"
- "pkg/benchmark/job/**"
- "cmd/benchmark/job/**"
- "pkg/tools/benchmark/operator/**"
- "cmd/tools/benchmark/operator/**"
- "pkg/tools/benchmark/job/**"
- "cmd/tools/benchmark/job/**"
- "dockers/tools/benchmark/job/Dockerfile"
- "versions/GO_VERSION"
pull_request:
Expand All @@ -50,10 +50,10 @@ on:
- "!internal/**/*_test.go"
- "!internal/db/**"
- "apis/grpc/**"
- "pkg/benchmark/operator/**"
- "cmd/benchmark/operator/**"
- "pkg/benchmark/job/**"
- "cmd/benchmark/job/**"
- "pkg/tools/benchmark/operator/**"
- "cmd/tools/benchmark/operator/**"
- "pkg/tools/benchmark/job/**"
- "cmd/tools/benchmark/job/**"
- "dockers/tools/benchmark/job/Dockerfile"
- "versions/GO_VERSION"
pull_request_target:
Expand All @@ -67,10 +67,10 @@ on:
- "!internal/**/*_test.go"
- "!internal/db/**"
- "apis/grpc/**"
- "pkg/benchmark/operator/**"
- "cmd/benchmark/operator/**"
- "pkg/benchmark/job/**"
- "cmd/benchmark/job/**"
- "pkg/tools/benchmark/operator/**"
- "cmd/tools/benchmark/operator/**"
- "pkg/tools/benchmark/job/**"
- "cmd/tools/benchmark/job/**"
- "dockers/tools/benchmark/job/Dockerfile"
- "versions/GO_VERSION"
jobs:
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/dockers-benchmark-operator-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ on:
- "!internal/**/*_test.go"
- "!internal/db/**"
- "apis/grpc/**"
- "pkg/benchmark/operator/**"
- "cmd/benchmark/operator/**"
- "pkg/benchmark/job/**"
- "cmd/benchmark/job/**"
- "pkg/tools/benchmark/operator/**"
- "cmd/tools/benchmark/operator/**"
- "pkg/tools/benchmark/job/**"
- "cmd/tools/benchmark/job/**"
- "dockers/tools/benchmark/operator/Dockerfile"
- "versions/GO_VERSION"
pull_request:
Expand All @@ -50,10 +50,10 @@ on:
- "!internal/**/*_test.go"
- "!internal/db/**"
- "apis/grpc/**"
- "pkg/benchmark/operator/**"
- "cmd/benchmark/operator/**"
- "pkg/benchmark/job/**"
- "cmd/benchmark/job/**"
- "pkg/tools/benchmark/operator/**"
- "cmd/tools/benchmark/operator/**"
- "pkg/tools/benchmark/job/**"
- "cmd/tools/benchmark/job/**"
- "dockers/tools/benchmark/operator/Dockerfile"
- "versions/GO_VERSION"
pull_request_target:
Expand All @@ -67,10 +67,10 @@ on:
- "!internal/**/*_test.go"
- "!internal/db/**"
- "apis/grpc/**"
- "pkg/benchmark/operator/**"
- "cmd/benchmark/operator/**"
- "pkg/benchmark/job/**"
- "cmd/benchmark/job/**"
- "pkg/tools/benchmark/operator/**"
- "cmd/tools/benchmark/operator/**"
- "pkg/tools/benchmark/job/**"
- "cmd/tools/benchmark/job/**"
- "dockers/tools/benchmark/operator/Dockerfile"
- "versions/GO_VERSION"
jobs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
type: string
schema:
openAPIV3Schema:
description: ValdBenchmarkScenario is the Schema for the valdbenchmarkscenarios API
description: ValdBenchmarkOperator is the Schema for the valdbenchmarkoperator API
type: object
properties:
apiVersion:
Expand All @@ -52,7 +52,7 @@ spec:
metadata:
type: object
status:
description: ValdBenchmarkScenarioStatus defines the observed state of ValdBenchmarkScenario
description: ValdBenchmarkOperatorStatus defines the observed state of ValdBenchmarkOperator
enum:
- NotReady
- Completed
Expand All @@ -68,6 +68,11 @@ spec:
annotations:
type: object
x-kubernetes-preserve-unknown-fields: true
env:
type: array
items:
type: object
x-kubernetes-preserve-unknown-fields: true
image:
type: object
properties:
Expand Down
7 changes: 3 additions & 4 deletions charts/vald-benchmark-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,10 @@ spec:
volumeMounts:
- name: {{ .Values.name }}-config
mountPath: /etc/server
{{- if .Values.env }}
env:
- name: JOB_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- toYaml .Values.env | nindent 12 }}
{{- end }}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
restartPolicy: Always
Expand Down
25 changes: 22 additions & 3 deletions charts/vald-benchmark-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -454,11 +454,11 @@ observability:
# @schema {"name": "observability.otlp.attribute", "type": "object"}
attribute:
# @schema {"name": "observability.otlp.attribute.namespace", "type": "string"}
namespace: "_MY_POD_NAMESPACE_"
namespace: _MY_POD_NAMESPACE_
# @schema {"name": "observability.otlp.attribute.pod_name", "type": "string"}
pod_name: "_MY_POD_NAME_"
pod_name: _MY_POD_NAME_
# @schema {"name": "observability.otlp.attribute.node_name", "type": "string"}
node_name: "_MY_NODE_NAME_"
node_name: _MY_NODE_NAME_
# @schema {"name": "observability.otlp.attribute.service_name", "type": "string"}
service_name: "vald-benchmark-operator"
# @schema {"name": "observability.otlp.attribute.metrics", "type": "object"}
Expand Down Expand Up @@ -487,3 +487,22 @@ observability:
enabled: false
# @schema {"name": "observability.trace.sampling_rate", "type": "integer"}
sampling_rate: 1
# @schema {"name": "env", "type": "array", "items": {"type": "object"}, "anchor": "env"}
# env -- environment variables
env:
- name: MY_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: JOB_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
4 changes: 2 additions & 2 deletions internal/config/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ func (b *BenchmarkScenario) Bind() *BenchmarkScenario {

// BenchmarkJobImageInfo represents the docker image information for benchmark job.
type BenchmarkJobImageInfo struct {
Image string `json:"image,omitempty" yaml:"image"`
PullPolicy string `json:"pull_policy,omitempty" yaml:"pull_policy"`
Image string `info:"image" json:"image,omitempty" yaml:"image"`
PullPolicy string `info:"pull_policy" json:"pull_policy,omitempty" yaml:"pull_policy"`
}

// Bind binds the actual data from the BenchmarkJobImageInfo receiver fields.
Expand Down
Loading

0 comments on commit 56cddd0

Please sign in to comment.