Skip to content

feat: support custom Pod labels, service accounts, and scheduler - #260

Merged
Fu Wei (fuweid) merged 6 commits into
mainfrom
maliyu/kperf-wi-support
Nov 6, 2026
Merged

Fu Wei (fuweid) merged 6 commits into
mainfrom
maliyu/kperf-wi-support

Conversation

@liyu-ma

@liyu-ma Liyu Ma (liyu-ma) commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Extend profile-driven Pod creation with optional labels, ServiceAccount, and scheduler name, preserving defaults when omitted.

Changes

  • Add labels, serviceAccountName, and schedulerName to postDel.pod.
  • Allow custom labels to override the default app label.
  • Validate custom Pod labels before starting load runs.

Validation

  • Tests cover default and custom Pod options.
  • Request-package and data-command tests passed.
  • Both command builds passed.
  • No live-cluster validation performed.

@liyu-ma Liyu Ma (liyu-ma) changed the title feat: support workload identity admission benchmarks [wip] feat: support more configuration on pod creation Oct 27, 2026
@liyu-ma
Liyu Ma (liyu-ma) force-pushed the maliyu/kperf-wi-support branch 2 times, most recently from 4092754 to b7cb23c Compare October 28, 2026 12:57
@liyu-ma Liyu Ma (liyu-ma) changed the title [wip] feat: support more configuration on pod creation feat: support custom Pod labels, service accounts, and scheduler Oct 28, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Custom pod labels bypass validation, allowing invalid keys to pass Validate() and cause Kubernetes to reject every generated Pod with HTTP 422.

1 open issue
What changed in this PR

Extends kperf’s profile-driven Pod creation with custom labels, ServiceAccount selection, and scheduler selection while preserving defaults when omitted.

Changes:

  • Adds optional Pod settings and allows custom labels to override the default app label.
  • Separates request builders and their tests from random-selection and payload-generation logic.
  • Adds default/custom Pod tests and avoids caching created resource names in create-only runs.
File Description
request/​random.go Moves request builders into a dedicated file.
request/​random_test.go Moves builder tests alongside the extracted builders.
request/​builder.go Applies Pod options and skips deletion caching for create-only runs.
request/​builder_test.go Retains patch tests and adds Pod-option coverage.
contrib/​internal/​manifests/​workload/​pods/​templates/​pod.tpl Renders custom Pod settings and quotes values.
api/​types/​load_traffic.go Defines new Pod options and restricts them to core/v1 Pods.

Review effort: Balanced

Comment thread api/types/load_traffic.go Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the optional Pod configuration changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread request/builder.go Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
serviceAccountName: "{{ .Values.serviceAccountName }}"
{{- end }}
{{- if .Values.schedulerName }}
schedulerName: "{{ .Values.schedulerName }}"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
schedulerName: "{{ .Values.schedulerName }}"
schedulerName: {{ printf "%q" .Values.schedulerName }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread request/random_test.go Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@fuweid
Fu Wei (fuweid) merged commit bbc7be6 into main Nov 6, 2026
7 checks passed
@fuweid
Fu Wei (fuweid) deleted the maliyu/kperf-wi-support branch November 6, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants