-
Notifications
You must be signed in to change notification settings - Fork 98
feat(manifests): add node overprovisioning for faster agentic session startup #1458
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
Open
rh-rahulshetty
wants to merge
16
commits into
ambient-code:main
Choose a base branch
from
rh-rahulshetty:feature/overprovisioner
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+85
−0
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4bd05da
changes for implementing node overprevisioner
rh-rahulshetty ef5bba0
Delete components/manifests/components/overprovisioner/prometheusrule…
rh-rahulshetty 1c91b0d
Merge branch 'main' into feature/overprovisioner
mergify[bot] d4f0081
Merge branch 'main' into feature/overprovisioner
mergify[bot] 0770082
Merge branch 'main' into feature/overprovisioner
mergify[bot] 893f728
Merge branch 'main' into feature/overprovisioner
mergify[bot] bc16a39
Merge branch 'main' into feature/overprovisioner
mergify[bot] 095c296
Merge branch 'main' into feature/overprovisioner
mergify[bot] 4e14119
Merge branch 'main' into feature/overprovisioner
mergify[bot] dc822a6
Merge branch 'main' into feature/overprovisioner
mergify[bot] 6f1a07e
Merge branch 'main' into feature/overprovisioner
mergify[bot] 60265d2
Merge branch 'main' into feature/overprovisioner
mergify[bot] ab24f87
Merge branch 'main' into feature/overprovisioner
mergify[bot] 0ffbb6a
Merge branch 'main' into feature/overprovisioner
mergify[bot] 5fa1e59
Merge branch 'main' into feature/overprovisioner
mergify[bot] c915e2a
Merge branch 'main' into feature/overprovisioner
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
components/manifests/components/overprovisioner/deployment.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: acp-overprovisioner | ||
| namespace: acp-overprovisioner | ||
| labels: | ||
| app: acp-overprovisioner | ||
| app.kubernetes.io/part-of: acp-overprovisioner | ||
| spec: | ||
| # ── Tunable: number of spare runner-sized slots to keep warm ── | ||
| # Each replica reserves capacity equivalent to one agentic session runner pod. | ||
| # Increase to handle larger bursts; decrease to reduce idle cost. | ||
| # Quick adjustment: kubectl scale deployment/acp-overprovisioner -n acp-overprovisioner --replicas=<N> | ||
| replicas: 5 | ||
| selector: | ||
| matchLabels: | ||
| app: acp-overprovisioner | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: acp-overprovisioner | ||
| annotations: | ||
| # Allows the cluster autoscaler to evict these pods when scaling down | ||
| # idle nodes. Without this, placeholder pods would block scale-down. | ||
| cluster-autoscaler.kubernetes.io/safe-to-evict: "true" | ||
| spec: | ||
| # Priority -10: any pod with default (0) or higher priority preempts these. | ||
| # When a runner pod needs capacity, the scheduler evicts a placeholder | ||
| # instantly, and the evicted placeholder triggers the autoscaler to | ||
| # replenish the buffer by adding a new node. | ||
| priorityClassName: acp-overprovisioning | ||
| # Evict immediately — no graceful shutdown needed for a pause container. | ||
| terminationGracePeriodSeconds: 0 | ||
| # Spread placeholders across nodes so spare capacity is distributed. | ||
| # ScheduleAnyway makes this best-effort — won't block scheduling if | ||
| # there are fewer nodes than replicas. | ||
| topologySpreadConstraints: | ||
| - maxSkew: 1 | ||
| topologyKey: kubernetes.io/hostname | ||
| whenUnsatisfiable: ScheduleAnyway | ||
| labelSelector: | ||
| matchLabels: | ||
| app: acp-overprovisioner | ||
| securityContext: | ||
| runAsNonRoot: true | ||
| seccompProfile: | ||
| type: RuntimeDefault | ||
| containers: | ||
| - name: pause | ||
| image: registry.k8s.io/pause:3.9 | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| readOnlyRootFilesystem: true | ||
| capabilities: | ||
| drop: ["ALL"] | ||
| resources: | ||
| requests: | ||
| # ── Tunable: must match runner pod resource requests ── | ||
| # These values mirror the agentic session runner container requests | ||
| # (see operator/internal/handlers/sessions.go defaults). | ||
| # When a placeholder is evicted, the freed capacity is exactly | ||
| # what a runner pod needs to start immediately. | ||
| cpu: "500m" | ||
| memory: "512Mi" | ||
| # No limits set intentionally — keeps QoS class as Burstable, | ||
| # making these pods easier to evict. The pause container uses | ||
| # zero actual CPU/memory; only requests matter for scheduling. | ||
6 changes: 6 additions & 0 deletions
6
components/manifests/components/overprovisioner/namespace.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| name: acp-overprovisioner | ||
| labels: | ||
| app.kubernetes.io/part-of: acp-overprovisioner |
12 changes: 12 additions & 0 deletions
12
components/manifests/components/overprovisioner/priorityclass.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| apiVersion: scheduling.k8s.io/v1 | ||
| kind: PriorityClass | ||
| metadata: | ||
| name: acp-overprovisioning | ||
| labels: | ||
| app.kubernetes.io/part-of: acp-overprovisioner | ||
| value: -10 | ||
| globalDefault: false | ||
| description: >- | ||
| Low-priority class for overprovisioning placeholder pods. | ||
| These pods reserve capacity for agentic session runners and | ||
| are preempted immediately when real workloads need scheduling. |
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.
Uh oh!
There was an error while loading. Please reload this page.