Skip to content

Export BEARER_TOKEN and build kube-burner-ocp from fork for kube-apiserver pprof#82349

Open
redhat-chai-bot wants to merge 1 commit into
openshift:mainfrom
redhat-chai-bot:add-bearer-token-for-apiserver-pprof
Open

Export BEARER_TOKEN and build kube-burner-ocp from fork for kube-apiserver pprof#82349
redhat-chai-bot wants to merge 1 commit into
openshift:mainfrom
redhat-chai-bot:add-bearer-token-for-apiserver-pprof

Conversation

@redhat-chai-bot

@redhat-chai-bot redhat-chai-bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Enable kube-apiserver CPU pprof collection for all PerfScale workloads in the payload-control-plane-6nodes job. This is an investigation aid for PERFSCALE-5323 — a confirmed 11-19% apiserverCPU_avg regression after the Kubernetes 1.36.2 rebase in OCP 5.0.

Problem

Audit log analysis confirmed that the API call volume during node-density-cni is essentially unchanged between pre-rebase (k8s v1.35.3) and post-rebase (k8s v1.36.2) — the regression is caused by each API call being more CPU-expensive, not by more calls. CPU pprof profiles are needed to identify which code paths cost more after the rebase.

The existing PPROF=true setting only collects OVN profiles (ovnkube-controller, ovnk-control-plane). kube-apiserver pprof requires bearer token auth and is not included in the upstream kube-burner-ocp binary.

Changes

All 6 step ref command scripts are updated with:

  1. BEARER_TOKEN setup — creates a kube-burner ServiceAccount in benchmark-operator namespace with cluster-admin ClusterRoleBinding, then generates a 6-hour bearer token. This follows the get_pprof_secrets() pattern from e2e-benchmarking common.sh L134-148.

  2. Custom kube-burner-ocp build — clones the fork branch redhat-chai-bot/kube-burner-ocp:add-kube-apiserver-pprof-targets which adds a kube-apiserver-cpu pprof target to all workload configs. Builds with make build, tarballs the binary, and sets KUBE_BURNER_URL to the local tarball so run.sh uses it instead of downloading from GitHub releases.

  3. Recurring pprof collection — adds --pprof-interval=1m to EXTRA_FLAGS for periodic 30-second CPU profile capture every minute during the workload (instead of the default single collection at end).

Modified scripts

  • cluster-density-v2-commands.sh
  • cudn-density-commands.sh
  • node-density-cni-commands.sh
  • node-density-heavy-commands.sh
  • node-density-commands.sh
  • udn-density-pods-commands.sh

Next steps

Once merged, trigger pre-rebase and post-rebase runs to compare kube-apiserver CPU profiles and identify which code paths regressed in k8s 1.36.2.

Cleanup

After the investigation, the fork build logic should be removed and replaced with the appropriate KUBE_BURNER_VERSION override once upstream kube-burner-ocp includes kube-apiserver pprof targets natively.


@mcornea requested in Slack thread

Summary by CodeRabbit

  • Updates the CI step scripts used by the payload-control-plane-6nodes PerfScale job (cluster-density-v2, CUDN-density, node-density-cni, node-density-heavy, node-density, and UDN-density-pods) to collect recurring kube-apiserver CPU pprof profiles by adding --pprof-interval=1m to the kube-burner flags.
  • Adds kube-apiserver profiling access by provisioning benchmark-operator RBAC (creates kube-burner ServiceAccount + cluster-admin binding) and exporting a 6-hour BEARER_TOKEN.
  • Switches kube-burner-ocp execution to a custom binary built from a fork/branch (add-kube-apiserver-pprof-targets), exports it via a local file:// tarball (KUBE_BURNER_URL), and uses that artifact for the workload runs.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@redhat-chai-bot, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 20 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 35d144ae-43c0-4067-8fbc-13f893bed200

📥 Commits

Reviewing files that changed from the base of the PR and between 67afbaf and 45bbd1f.

📒 Files selected for processing (6)
  • ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh
  • ci-operator/step-registry/openshift-qe/cudn-density/openshift-qe-cudn-density-commands.sh
  • ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh
  • ci-operator/step-registry/openshift-qe/node-density-heavy/openshift-qe-node-density-heavy-commands.sh
  • ci-operator/step-registry/openshift-qe/node-density/openshift-qe-node-density-commands.sh
  • ci-operator/step-registry/openshift-qe/udn-density-pods/openshift-qe-udn-density-pods-commands.sh

Walkthrough

The six density workload scripts now enable fixed-interval pprof polling, provision kube-burner profiling access, build a custom kube-burner binary with kube-apiserver targets, and export the resulting credentials and local artifact URL.

Changes

Density profiling workflows

Layer / File(s) Summary
Profiling runtime configuration
ci-operator/step-registry/openshift-qe/{cluster-density-v2,cudn-density,node-density-cni,node-density-heavy,node-density,udn-density-pods}/*-commands.sh
Workload flags now include --pprof-interval=1m; existing ES_SERVER, EXTRA_FLAGS, and profile-related exports remain wired through the affected scripts.
Profiling access provisioning
ci-operator/step-registry/openshift-qe/{cluster-density-v2,cudn-density,node-density-cni,node-density-heavy,node-density,udn-density-pods}/*-commands.sh
Scripts create the benchmark-operator namespace, kube-burner service account, cluster-admin clusterrolebinding, and export a generated BEARER_TOKEN.
Custom kube-burner packaging
ci-operator/step-registry/openshift-qe/{cluster-density-v2,cudn-density,node-density-cni,node-density-heavy,node-density,udn-density-pods}/*-commands.sh
Scripts clone and build the kube-apiserver-pprof fork, package kube-burner-ocp, and export KUBE_BURNER_URL for the local tarball.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: chentex, jtaleric

Sequence Diagram(s)

sequenceDiagram
  participant DensityScript
  participant OpenShiftCluster
  participant CustomBuild
  participant kube-burner
  DensityScript->>OpenShiftCluster: Provision profiling RBAC
  OpenShiftCluster-->>DensityScript: Return BEARER_TOKEN
  DensityScript->>CustomBuild: Clone and build kube-burner-ocp
  CustomBuild-->>DensityScript: Return packaged local tarball
  DensityScript->>kube-burner: Export KUBE_BURNER_URL and profiling flags
  kube-burner->>OpenShiftCluster: Run workload with authenticated pprof collection
Loading

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error FAIL: the scripts run with set -x, and the new BEARER_TOKEN=$(oc create token ...) line will xtrace the token value into logs. Wrap secret capture/export in set +x/set -x guards, or otherwise suppress tracing before BEARER_TOKEN and other secret-valued assignments.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the core change: exporting BEARER_TOKEN and using a forked kube-burner-ocp for kube-apiserver pprof.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR only changes shell command scripts; no Ginkgo It/Describe/Context/When titles are added or modified.
Test Structure And Quality ✅ Passed Only six shell step-registry scripts changed; no Ginkgo test files, It blocks, or assertions were modified, so this test-quality check is not applicable.
Microshift Test Compatibility ✅ Passed PR only changes six CI shell scripts for kube-burner profiling; no new Ginkgo tests or MicroShift-relevant test code was added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only step-registry shell scripts changed; no new Ginkgo e2e tests or topology-sensitive test logic were added, so SNO compatibility is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR only edits benchmark shell wrappers; no manifests/controllers add pod affinity, topology spread, node selectors, or control-plane/arbiter scheduling constraints.
Ote Binary Stdout Contract ✅ Passed PASS: The PR only changes six shell step-registry scripts; no OTE binary source or process-level stdout-writing code was modified.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No Ginkgo e2e tests were added; the PR only changes shell step-registry scripts, so this IPv6/disconnected-test check is not applicable.
No-Weak-Crypto ✅ Passed Reviewed the changed scripts; they only add kube RBAC/token setup and a local kube-burner tarball, with no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB or custom secret comparisons.
Container-Privileges ✅ Passed Only step-registry shell scripts changed; no container/K8s manifests or privilege/securityContext fields were added.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: redhat-chai-bot
Once this PR has been reviewed and has the lgtm label, please assign jtaleric for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
openshift-ci Bot requested review from chentex and jtaleric July 23, 2026 13:46

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🧹 Nitpick comments (2)
ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh (2)

84-95: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

All six scripts build kube-burner-ocp from an unpinned branch on an unofficial fork with a hardcoded bin/amd64/ output path. Cloning add-kube-apiserver-pprof-targets by branch name (not commit SHA) means the build can change or break unexpectedly if the branch is amended/force-pushed, and the hardcoded arch path assumes a fixed Makefile output layout.

  • ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh#L84-L95: pin FORK_BRANCH/clone to a specific commit SHA and confirm the runner image has git/make/Go available.
  • ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh#L71-L82: same pinning/verification.
  • ci-operator/step-registry/openshift-qe/node-density-heavy/openshift-qe-node-density-heavy-commands.sh#L66-L77: same pinning/verification.
  • ci-operator/step-registry/openshift-qe/node-density/openshift-qe-node-density-commands.sh#L74-L85: same pinning/verification.
  • ci-operator/step-registry/openshift-qe/cudn-density/openshift-qe-cudn-density-commands.sh#L77-L88: same pinning/verification.
  • ci-operator/step-registry/openshift-qe/udn-density-pods/openshift-qe-udn-density-pods-commands.sh#L87-L98: same pinning/verification.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh`
around lines 84 - 95, Pin FORK_BRANCH in the kube-burner-ocp build flow to a
specific commit SHA and clone that immutable revision; replace the hardcoded
bin/amd64/kube-burner-ocp lookup with a validated output path or discovery
compatible with the build. Confirm git, make, and Go are available before
building. Apply the same changes in
ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh
lines 84-95, node-density-cni/openshift-qe-node-density-cni-commands.sh lines
71-82, node-density-heavy/openshift-qe-node-density-heavy-commands.sh lines
66-77, node-density/openshift-qe-node-density-commands.sh lines 74-85,
cudn-density/openshift-qe-cudn-density-commands.sh lines 77-88, and
udn-density-pods/openshift-qe-udn-density-pods-commands.sh lines 87-98.

79-81: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Blanket || true on ns/SA/CRB creation masks real failures, not just AlreadyExists, in all six scripts. A genuine RBAC/API failure here silently propagates into a broken/empty BEARER_TOKEN later, making failures much harder to diagnose.

  • ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh#L79-L81: check for existing resources explicitly (e.g. oc get ... || oc create ...) instead of a blind || true.
  • ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh#L66-L68: same fix.
  • ci-operator/step-registry/openshift-qe/node-density-heavy/openshift-qe-node-density-heavy-commands.sh#L61-L63: same fix.
  • ci-operator/step-registry/openshift-qe/node-density/openshift-qe-node-density-commands.sh#L69-L71: same fix.
  • ci-operator/step-registry/openshift-qe/cudn-density/openshift-qe-cudn-density-commands.sh#L72-L74: same fix.
  • ci-operator/step-registry/openshift-qe/udn-density-pods/openshift-qe-udn-density-pods-commands.sh#L82-L84: same fix.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh`
around lines 79 - 81, Replace the blanket “|| true” handling for namespace,
service account, and cluster role binding creation with explicit existence
checks followed by creation only when absent, while allowing genuine oc/API
failures to propagate. Apply this consistently at the resource-creation blocks
in
ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh:79-81,
ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh:66-68,
ci-operator/step-registry/openshift-qe/node-density-heavy/openshift-qe-node-density-heavy-commands.sh:61-63,
ci-operator/step-registry/openshift-qe/node-density/openshift-qe-node-density-commands.sh:69-71,
ci-operator/step-registry/openshift-qe/cudn-density/openshift-qe-cudn-density-commands.sh:72-74,
and
ci-operator/step-registry/openshift-qe/udn-density-pods/openshift-qe-udn-density-pods-commands.sh:82-84.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh`:
- Around line 78-81: The kube-burner service account currently receives
cluster-admin solely for kube-apiserver pprof access. In all six
scripts—ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh:78-81,
node-density-cni/openshift-qe-node-density-cni-commands.sh:65-68,
node-density-heavy/openshift-qe-node-density-heavy-commands.sh:60-63,
node-density/openshift-qe-node-density-commands.sh:68-71,
cudn-density/openshift-qe-cudn-density-commands.sh:71-74, and
udn-density-pods/openshift-qe-udn-density-pods-commands.sh:81-84—replace the
cluster-admin binding with a dedicated ClusterRole granting only get on
nonResourceURLs /debug/pprof/* and a corresponding ClusterRoleBinding for the
kube-burner service account.
- Around line 78-82: The BEARER_TOKEN assignment is exposed by shell tracing and
also violates SC2155. In
ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh
lines 78-82, disable tracing before token generation, declare BEARER_TOKEN
separately from the command substitution, then re-enable tracing afterward.
Apply the same set +x/set -x wrapping to the BEARER_TOKEN assignment in
ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh
lines 65-69,
ci-operator/step-registry/openshift-qe/node-density-heavy/openshift-qe-node-density-heavy-commands.sh
lines 60-64,
ci-operator/step-registry/openshift-qe/node-density/openshift-qe-node-density-commands.sh
lines 68-72,
ci-operator/step-registry/openshift-qe/cudn-density/openshift-qe-cudn-density-commands.sh
lines 71-75, and
ci-operator/step-registry/openshift-qe/udn-density-pods/openshift-qe-udn-density-pods-commands.sh
lines 81-85.

---

Nitpick comments:
In
`@ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh`:
- Around line 84-95: Pin FORK_BRANCH in the kube-burner-ocp build flow to a
specific commit SHA and clone that immutable revision; replace the hardcoded
bin/amd64/kube-burner-ocp lookup with a validated output path or discovery
compatible with the build. Confirm git, make, and Go are available before
building. Apply the same changes in
ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh
lines 84-95, node-density-cni/openshift-qe-node-density-cni-commands.sh lines
71-82, node-density-heavy/openshift-qe-node-density-heavy-commands.sh lines
66-77, node-density/openshift-qe-node-density-commands.sh lines 74-85,
cudn-density/openshift-qe-cudn-density-commands.sh lines 77-88, and
udn-density-pods/openshift-qe-udn-density-pods-commands.sh lines 87-98.
- Around line 79-81: Replace the blanket “|| true” handling for namespace,
service account, and cluster role binding creation with explicit existence
checks followed by creation only when absent, while allowing genuine oc/API
failures to propagate. Apply this consistently at the resource-creation blocks
in
ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh:79-81,
ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh:66-68,
ci-operator/step-registry/openshift-qe/node-density-heavy/openshift-qe-node-density-heavy-commands.sh:61-63,
ci-operator/step-registry/openshift-qe/node-density/openshift-qe-node-density-commands.sh:69-71,
ci-operator/step-registry/openshift-qe/cudn-density/openshift-qe-cudn-density-commands.sh:72-74,
and
ci-operator/step-registry/openshift-qe/udn-density-pods/openshift-qe-udn-density-pods-commands.sh:82-84.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 28805ad0-8fd2-4224-b79d-4712c9f28e6e

📥 Commits

Reviewing files that changed from the base of the PR and between 3268e14 and f2e2f7b.

📒 Files selected for processing (6)
  • ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh
  • ci-operator/step-registry/openshift-qe/cudn-density/openshift-qe-cudn-density-commands.sh
  • ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh
  • ci-operator/step-registry/openshift-qe/node-density-heavy/openshift-qe-node-density-heavy-commands.sh
  • ci-operator/step-registry/openshift-qe/node-density/openshift-qe-node-density-commands.sh
  • ci-operator/step-registry/openshift-qe/udn-density-pods/openshift-qe-udn-density-pods-commands.sh

Comment on lines +78 to +81
# Setup pprof secrets for kube-apiserver profiling
oc create ns benchmark-operator || true
oc create serviceaccount kube-burner -n benchmark-operator || true
oc create clusterrolebinding kube-burner-crb --clusterrole=cluster-admin --serviceaccount=benchmark-operator:kube-burner || true

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.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

All six scripts bind cluster-admin to the kube-burner SA solely to scrape kube-apiserver pprof. A ClusterRole scoped to nonResourceURLs: ["/debug/pprof/*"] with verb: get would be sufficient and avoids granting full cluster-admin to a token that lives in benchmark-operator.

  • ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh#L78-L81: replace the cluster-admin clusterrolebinding with a scoped pprof ClusterRole/binding.
  • ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh#L65-L68: same replacement.
  • ci-operator/step-registry/openshift-qe/node-density-heavy/openshift-qe-node-density-heavy-commands.sh#L60-L63: same replacement.
  • ci-operator/step-registry/openshift-qe/node-density/openshift-qe-node-density-commands.sh#L68-L71: same replacement.
  • ci-operator/step-registry/openshift-qe/cudn-density/openshift-qe-cudn-density-commands.sh#L71-L74: same replacement.
  • ci-operator/step-registry/openshift-qe/udn-density-pods/openshift-qe-udn-density-pods-commands.sh#L81-L84: same replacement.
📍 Affects 6 files
  • ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh#L78-L81 (this comment)
  • ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh#L65-L68
  • ci-operator/step-registry/openshift-qe/node-density-heavy/openshift-qe-node-density-heavy-commands.sh#L60-L63
  • ci-operator/step-registry/openshift-qe/node-density/openshift-qe-node-density-commands.sh#L68-L71
  • ci-operator/step-registry/openshift-qe/cudn-density/openshift-qe-cudn-density-commands.sh#L71-L74
  • ci-operator/step-registry/openshift-qe/udn-density-pods/openshift-qe-udn-density-pods-commands.sh#L81-L84
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh`
around lines 78 - 81, The kube-burner service account currently receives
cluster-admin solely for kube-apiserver pprof access. In all six
scripts—ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh:78-81,
node-density-cni/openshift-qe-node-density-cni-commands.sh:65-68,
node-density-heavy/openshift-qe-node-density-heavy-commands.sh:60-63,
node-density/openshift-qe-node-density-commands.sh:68-71,
cudn-density/openshift-qe-cudn-density-commands.sh:71-74, and
udn-density-pods/openshift-qe-udn-density-pods-commands.sh:81-84—replace the
cluster-admin binding with a dedicated ClusterRole granting only get on
nonResourceURLs /debug/pprof/* and a corresponding ClusterRoleBinding for the
kube-burner service account.

Comment on lines +78 to +82
# Setup pprof secrets for kube-apiserver profiling
oc create ns benchmark-operator || true
oc create serviceaccount kube-burner -n benchmark-operator || true
oc create clusterrolebinding kube-burner-crb --clusterrole=cluster-admin --serviceaccount=benchmark-operator:kube-burner || true
export BEARER_TOKEN=$(oc create token -n benchmark-operator kube-burner --duration=6h || oc sa get-token kube-burner -n benchmark-operator)

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.

🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win

BEARER_TOKEN leaks into CI logs via set -x in all six workload scripts. Each script enables set -x at the top and never disables tracing before generating/exporting the SA bearer token, so the token literal is echoed into build logs — a direct credential leak, and a violation of the guideline to disable tracing around sensitive operations.

  • ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh#L78-L82: wrap the export BEARER_TOKEN=$(...) line with set +x / set -x and split the declare/assign per SC2155.
  • ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh#L65-L69: apply the same set +x/set -x wrapping around the BEARER_TOKEN export.
  • ci-operator/step-registry/openshift-qe/node-density-heavy/openshift-qe-node-density-heavy-commands.sh#L60-L64: apply the same fix.
  • ci-operator/step-registry/openshift-qe/node-density/openshift-qe-node-density-commands.sh#L68-L72: apply the same fix.
  • ci-operator/step-registry/openshift-qe/cudn-density/openshift-qe-cudn-density-commands.sh#L71-L75: apply the same fix.
  • ci-operator/step-registry/openshift-qe/udn-density-pods/openshift-qe-udn-density-pods-commands.sh#L81-L85: apply the same fix.
🧰 Tools
🪛 Shellcheck (0.11.0)

[warning] 82-82: Declare and assign separately to avoid masking return values.

(SC2155)

📍 Affects 6 files
  • ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh#L78-L82 (this comment)
  • ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh#L65-L69
  • ci-operator/step-registry/openshift-qe/node-density-heavy/openshift-qe-node-density-heavy-commands.sh#L60-L64
  • ci-operator/step-registry/openshift-qe/node-density/openshift-qe-node-density-commands.sh#L68-L72
  • ci-operator/step-registry/openshift-qe/cudn-density/openshift-qe-cudn-density-commands.sh#L71-L75
  • ci-operator/step-registry/openshift-qe/udn-density-pods/openshift-qe-udn-density-pods-commands.sh#L81-L85
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh`
around lines 78 - 82, The BEARER_TOKEN assignment is exposed by shell tracing
and also violates SC2155. In
ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh
lines 78-82, disable tracing before token generation, declare BEARER_TOKEN
separately from the command substitution, then re-enable tracing afterward.
Apply the same set +x/set -x wrapping to the BEARER_TOKEN assignment in
ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh
lines 65-69,
ci-operator/step-registry/openshift-qe/node-density-heavy/openshift-qe-node-density-heavy-commands.sh
lines 60-64,
ci-operator/step-registry/openshift-qe/node-density/openshift-qe-node-density-commands.sh
lines 68-72,
ci-operator/step-registry/openshift-qe/cudn-density/openshift-qe-cudn-density-commands.sh
lines 71-75, and
ci-operator/step-registry/openshift-qe/udn-density-pods/openshift-qe-udn-density-pods-commands.sh
lines 81-85.

Source: Coding guidelines

@mcornea

mcornea commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

/pj-rehearse periodic-ci-openshift-eng-ocp-perfscale-main-aws-5.0-nightly-x86-payload-control-plane-6nodes

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@mcornea: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@redhat-chai-bot
redhat-chai-bot force-pushed the add-bearer-token-for-apiserver-pprof branch from f2e2f7b to 67afbaf Compare July 23, 2026 13:59

@coderabbitai coderabbitai Bot 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh (1)

108-117: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Point the timeout recovery check at the custom binary path.

The script ships the built binary from /tmp/kube-burner-ocp-bin/kube-burner-ocp into file:///tmp/kube-burner-ocp-custom.tar.gz. If the wrapper leaves that tarball unpacked or extracts to a non-executable location, if /tmp/kube-burner-ocp cluster-health; then silently fails on run.sh exit code 2 and skips the intended health-check fallback. Match the health check to the actual executable path used by KUBE_BURNER_URL.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh`
around lines 108 - 117, Update the cluster-health invocation in the
RUN_EXIT_CODE 2 recovery block to use the executable path configured through
KUBE_BURNER_URL, specifically the custom binary location used by the shipped
kube-burner artifact, instead of /tmp/kube-burner-ocp. Preserve the existing
health-check fallback and cleanup behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh`:
- Around line 108-117: Update the cluster-health invocation in the RUN_EXIT_CODE
2 recovery block to use the executable path configured through KUBE_BURNER_URL,
specifically the custom binary location used by the shipped kube-burner
artifact, instead of /tmp/kube-burner-ocp. Preserve the existing health-check
fallback and cleanup behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 859c8ea5-ffd9-4eff-8ca8-093ebf4b7397

📥 Commits

Reviewing files that changed from the base of the PR and between f2e2f7b and 67afbaf.

📒 Files selected for processing (6)
  • ci-operator/step-registry/openshift-qe/cluster-density-v2/openshift-qe-cluster-density-v2-commands.sh
  • ci-operator/step-registry/openshift-qe/cudn-density/openshift-qe-cudn-density-commands.sh
  • ci-operator/step-registry/openshift-qe/node-density-cni/openshift-qe-node-density-cni-commands.sh
  • ci-operator/step-registry/openshift-qe/node-density-heavy/openshift-qe-node-density-heavy-commands.sh
  • ci-operator/step-registry/openshift-qe/node-density/openshift-qe-node-density-commands.sh
  • ci-operator/step-registry/openshift-qe/udn-density-pods/openshift-qe-udn-density-pods-commands.sh

@mcornea

mcornea commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

/pj-rehearse periodic-ci-openshift-eng-ocp-perfscale-main-aws-5.0-nightly-x86-payload-control-plane-6nodes

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@mcornea: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

Set BEARER_TOKEN=$(oc whoami -t) before kube-burner-ocp invocation in
all openshift-qe step ref command scripts that use PPROF. This provides
the authentication token needed by the new kube-apiserver pprof targets
(PERFSCALE-5323).
@redhat-chai-bot
redhat-chai-bot force-pushed the add-bearer-token-for-apiserver-pprof branch from 67afbaf to 45bbd1f Compare July 23, 2026 15:52
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@redhat-chai-bot: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-eng-ocp-perfscale-main-aws-4.23-nightly-x86-compact-cp-3nodes openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-aws-4.22-nightly-x86-compact-cp-3nodes openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-aws-4.21-nightly-x86-compact-cp-3nodes openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-aws-5.0-nightly-x86-compact-cp-3nodes openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-aws-4.20-nightly-x86-compact-cp-3nodes openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-aws-4.23-nightly-x86-loaded-upgrade-from-4.22-loaded-upgrade-180nodes openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.22-nightly-x86-control-plane-120nodes-onperfsector openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.22-nightly-x86-control-plane-249nodes-onperfsector-cdv2 openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.22-nightly-x86-control-plane-498nodes-onperfsector-cdv2 openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa-4.22-candidate-x86-loaded-upgrade-from-4.21-loaded-upgrade-24nodes openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa-4.22-candidate-x86-loaded-upgrade-from-4.21-loaded-upgrade-120nodes openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa-4.22-candidate-x86-loaded-upgrade-from-4.21-loaded-upgrade-249nodes openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.22-candidate-x86-loaded-upgrade-from-4.21-loaded-upgrade-24nodes openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.22-candidate-x86-loaded-upgrade-from-4.21-loaded-upgrade-120nodes openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.22-candidate-x86-loaded-upgrade-from-4.21-loaded-upgrade-249nodes openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.22-candidate-x86-loaded-upgrade-from-4.21-loaded-upgrade-498nodes openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.22-candidate-x86-loaded-upgrade-from-4.21-loaded-upgrade-498nodes-onperfsector openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.21-nightly-x86-control-plane-24nodes-onperfsector openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.21-nightly-x86-control-plane-120nodes-onperfsector openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.21-nightly-x86-control-plane-249nodes-onperfsector-cdv2 openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.21-nightly-x86-control-plane-498nodes-onperfsector-cdv2 openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.23-nightly-x86-control-plane-24nodes-onperfsector openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.23-nightly-x86-control-plane-120nodes-onperfsector openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.23-nightly-x86-control-plane-249nodes-onperfsector-cdv2 openshift-eng/ocp-perfscale presubmit Registry content changed
pull-ci-openshift-eng-ocp-perfscale-main-rosa_hcp-4.23-nightly-x86-control-plane-498nodes-onperfsector-cdv2 openshift-eng/ocp-perfscale presubmit Registry content changed

A total of 737 jobs have been affected by this change. The above listing is non-exhaustive and limited to 25 jobs.

A full list of affected jobs can be found here

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@mcornea

mcornea commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

/pj-rehearse periodic-ci-openshift-eng-ocp-perfscale-main-aws-5.0-nightly-x86-payload-control-plane-6nodes

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@mcornea: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@mcornea

mcornea commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

/pj-rehearse periodic-ci-openshift-eng-ocp-perfscale-main-aws-5.0-nightly-x86-payload-control-plane-6nodes

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@mcornea: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@redhat-chai-bot: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/periodic-ci-openshift-eng-ocp-perfscale-main-aws-5.0-nightly-x86-payload-control-plane-6nodes 45bbd1f link unknown /pj-rehearse periodic-ci-openshift-eng-ocp-perfscale-main-aws-5.0-nightly-x86-payload-control-plane-6nodes

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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.

2 participants