Add bulk workload restart and scale actions#910
Open
nadaverell wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3866d4f. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Adds workload-aware bulk actions to the Resources table bulk-select mode.
/api/capabilitiessays the user can patch that workload kind.Bulk scale uses the existing workload scale endpoint, supports setting replicas to zero, and warns that autoscalers may override the requested replica count. Fixes #902.
Validation
go test ./internal/k8s ./internal/servernpm --workspace @skyhook-io/k8s-ui run tscnpm --workspace @skyhook-io/radar-app run tscnpm --workspace @skyhook-io/k8s-ui testgit diff --check./scripts/visual-test-start.sh.playwright-mcp/visual-test/20260613-022402/deployments-bulk-actions-1920.png.playwright-mcp/visual-test/20260613-022402/deployments-bulk-restart-confirm.png.playwright-mcp/visual-test/20260613-022402/deployments-bulk-scale-dialog.png.playwright-mcp/visual-test/20260613-022402/deployments-bulk-scale-zero-dialog.png.playwright-mcp/visual-test/20260613-022402/deployments-bulk-actions-1280.png.playwright-mcp/visual-test/20260613-022402/rollouts-bulk-restart-no-scale.pngNote
Medium Risk
Introduces cluster mutation paths (bulk restart/scale) gated by UI capabilities but still relying on per-request RBAC on workload endpoints; capability logic changes (always-on namespace checks, new patch probes) can change which actions users see.
Overview
Extends capabilities with
workloadWrites(patch permission per Deployment, DaemonSet, StatefulSet, and Argo Rollout). Global checks pass API group into SAR; workload patch probes do not use the kubeconfig namespace fallback. Namespace capability re-checks always run for?namespace=(not only when exec/logs were denied) and merge exec, logs, port-forward, and workloadWrites; authenticated requests use per-user namespace SAR viaCheckNamespaceCapabilitiesForUser.The Resources bulk-select bar gains Restart (deployments, statefulsets, daemonsets, rollouts) and Scale (deployments, statefulsets), with confirm dialogs and a shared replica picker (including scale-to-zero). The web app wires
useBulkRestartWorkloads/useBulkScaleWorkloadsto existingPOST /workloads/.../restartand.../scaleendpoints, shows actions only when capabilities allow, and for multi-namespace filters intersects patch permission across namespaces. Types, default/restricted capability stubs, and a smoke test assert the newworkloadWriteswire shape.Reviewed by Cursor Bugbot for commit 75d5d47. Bugbot is set up for automated code reviews on this repo. Configure here.