Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport PR #2430 to release/v1.7 for Add base of benchmark operator dashboard #2453

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading