chore(app-manifest): soft-pin dev workloads to agentpool node pool - #88
Merged
Conversation
Keep dev off the prod userpool node during camp so dev workloads can't compete with prod for CPU. Soft nodeAffinity preference (weight 100) for the agentpool pool on all dev deployments + sync CronJobs; preference only so pods still schedule if agentpool is full. Prod/monitoring untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the dev k8s/app-manifest/** kustomizations to prefer scheduling workloads onto the original agentpool node pool (via nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution), reducing contention with prod workloads on the newer userpool.
Changes:
- Added a Kustomize patch to dev
Deploymentworkloads to soft-prefer theagentpoolnode pool. - Added a similar patch for the
j26-scoutid-syncdevCronJobworkloads. - Minor kustomization formatting adjustment (resource list line alignment) in
j26-signupinfo.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| k8s/app-manifest/j26-app/kustomization.yaml | Adds nodeAffinity preference patch for Deployments. |
| k8s/app-manifest/j26-auth/kustomization.yaml | Adds nodeAffinity preference patch for Deployments. |
| k8s/app-manifest/j26-booking/kustomization.yaml | Adds nodeAffinity preference patch for Deployments. |
| k8s/app-manifest/j26-bracelet-checker/kustomization.yaml | Adds nodeAffinity preference patch for Deployments. |
| k8s/app-manifest/j26-cms/kustomization.yaml | Adds nodeAffinity preference patch for Deployments. |
| k8s/app-manifest/j26-interactive-screens/kustomization.yaml | Adds nodeAffinity preference patch for Deployments. |
| k8s/app-manifest/j26-keycloak-scoutid/kustomization.yaml | Adds nodeAffinity preference patch for Deployments. |
| k8s/app-manifest/j26-map/kustomization.yaml | Adds nodeAffinity preference patch for Deployments. |
| k8s/app-manifest/j26-notifications/kustomization.yaml | Adds nodeAffinity preference patch for Deployments (applies to multiple Deployments). |
| k8s/app-manifest/j26-photo-permission/kustomization.yaml | Adds nodeAffinity preference patch for Deployments. |
| k8s/app-manifest/j26-platsbank/kustomization.yaml | Adds nodeAffinity preference patch for Deployments. |
| k8s/app-manifest/j26-reports/kustomization.yaml | Adds nodeAffinity preference patch for Deployments. |
| k8s/app-manifest/j26-screens/kustomization.yaml | Adds nodeAffinity preference patch for Deployments. |
| k8s/app-manifest/j26-scoutid-sync/kustomization.yaml | Adds nodeAffinity preference patch for CronJobs. |
| k8s/app-manifest/j26-scoutin-2/kustomization.yaml | Adds nodeAffinity preference patch for Deployments. |
| k8s/app-manifest/j26-signupinfo/kustomization.yaml | Adds nodeAffinity preference patch for Deployments and adjusts resource list formatting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address Copilot review on #88: the JSON6902 `op: add` at /spec/template/spec/affinity replaces the whole affinity object, which would wipe an existing/future podAntiAffinity. Switch to strategic-merge patches so nodeAffinity is merged in and any other affinity settings are preserved. No existing dev workload has an affinity block today, so this is a no-op on current render (verified) but future-proofs the patch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
hakan-persson
added a commit
that referenced
this pull request
Jul 26, 2026
Mirror of #88 for the monitoring stack: add a soft nodeAffinity preference (weight 100) toward the original agentpool node pool on the four stateful, memory-heavy components — Grafana, Prometheus, Alertmanager (kube-prometheus -stack values) and Loki (singleBinary). Keeps them off the prod userpool node. Both nodes share zone swedencentral-1, so the PVC/zone binding alone does NOT keep these on the old node across a restart — this affinity makes that intent explicit. Preference only, so they still schedule if agentpool is full. DaemonSets (alloy, node-exporter) run on every node and are untouched. Verified with helm template (kube-prometheus-stack 80.2.2, loki 6.49.0): affinity renders on grafana/prometheus/alertmanager/loki only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Adds a soft
nodeAffinitypreference (weight 100) toward the originalagentpoolnode pool on every dev workload inapp-manifest/— 15 Deployments + the two sync CronJobs (16 apps).Why
During camp we added a second node pool (
userpool, Standard_D8as_v5, 8 vCPU) to give prod CPU headroom after the booking-app surge saturated the single 4-vCPU node (peaked at 97% CPU / load1 ~42). This change keeps dev workloads on the oldagentpoolnode so they can't compete with prod for CPU on the new node.It is a preference, not a hard rule — dev pods still schedule onto
userpoolifagentpoolis full, so nothing ever gets stuck unschedulable.Scope / safety
app-manifest-prod/) overlays are self-contained and do not inherit these dev bases — verified no leak into prod.kubectl kustomize(18 affinity blocks render correctly).🤖 Generated with Claude Code