Skip to content

CP-43958: support per-component affinity in aggregator - #881

Merged
evan-cz merged 1 commit into
developfrom
worktree-per-component-affinity
Jul 1, 2026
Merged

CP-43958: support per-component affinity in aggregator#881
evan-cz merged 1 commit into
developfrom
worktree-per-component-affinity

Conversation

@evan-cz

@evan-cz evan-cz commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Completes per-component affinity configuration for the CloudZero Agent Helm chart (CP-43958). Purely additive — no default-rendered manifest changes.

The only real gap was the aggregator: aggregator.affinity existed in values.yaml but the aggregator Deployment passed only defaults.affinity, so a user-set aggregator.affinity was silently ignored. This wires it in. Every other chart-managed workload already honored its per-component affinity — the server and webhook server via their own values, the init/cert/backfill/config-loader jobs via the sanctioned insightsController.server.affinity fallback, and bundled KSM via kubeStateMetrics.affinity.

  • Backward compatible: with the default empty affinity, rendered manifests are byte-identical to before — the tests/helm/template/ baselines are unchanged.

Testing

  • New helm/tests/component_affinity_test.yaml — per-component affinity rendering + cross-component isolation (6 tests).
  • make helm-test-unittest: full suite green. make helm-test-template-diff: clean (no baseline changes).

Scope notes

  • Config-only is intentional (see CP-43958). helmless-job deliberately left on defaults.affinity only.
  • No values.schema.json change — every affected affinity key was already present and schema-valid. The per-component affinity values are already documented by their existing values.yaml comments.
  • Out of scope (separate latent bug, tracked as CP-43967): the webhook server's non-functional hardcoded podAntiAffinity (selector app: webhook-server matches no pods).

🤖 Generated with Claude Code

@evan-cz
evan-cz force-pushed the worktree-per-component-affinity branch from b430b10 to c1d8d57 Compare June 30, 2026 18:46
Wire aggregator.affinity into the aggregator Deployment. The value was
defined in values.yaml but the template passed only defaults.affinity, so an
operator setting aggregator.affinity got nothing. Every other chart-managed
workload already honored its per-component affinity (server and webhook via
their own values, the init/cert/backfill/config-loader jobs via the
insightsController.server.affinity fallback, KSM via kubeStateMetrics.affinity);
the aggregator was the one gap.

Purely additive: with the default empty affinity the rendered manifests are
unchanged (the tests/helm/template baselines are untouched).

Add helm/tests/component_affinity_test.yaml covering per-component affinity
rendering and cross-component isolation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@evan-cz
evan-cz force-pushed the worktree-per-component-affinity branch from c1d8d57 to 5499df7 Compare June 30, 2026 18:59
@evan-cz evan-cz changed the title CP-43958: support per-component affinity in the Helm chart CP-43958: support per-component affinity in aggregator Jun 30, 2026
@evan-cz
evan-cz marked this pull request as ready for review June 30, 2026 20:38
@evan-cz
evan-cz requested a review from a team as a code owner June 30, 2026 20:38
@evan-cz
evan-cz enabled auto-merge July 1, 2026 14:05
@evan-cz
evan-cz added this pull request to the merge queue Jul 1, 2026
Merged via the queue into develop with commit 09c5e31 Jul 1, 2026
43 of 44 checks passed
@evan-cz
evan-cz deleted the worktree-per-component-affinity branch July 1, 2026 14:44
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