Skip to content

feat(api): add spec.pod to Gateway, Agent and MCP workloads - #309

Merged
edenreich merged 1 commit into
mainfrom
feat/issue-308-20261031-2255
Oct 31, 2026
Merged

edenreich merged 1 commit into
mainfrom
feat/issue-308-20261031-2255

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Summary

Adds a shared spec.pod block to Gateway, Agent and MCP so the pods the operator creates can be shaped for sidecar injection and scheduling.

  • New PodSpec API type (api/v1alpha1/pod_types.go) with labels, annotations, nodeSelector, tolerations and affinity, plus an ApplyTo method that merges it into a controller-built pod template. One type, one merge rule, wired into all three workload CRDs.
  • Operator-owned pod labels and annotations win over user-supplied ones, so the app: <name> label the Deployment selector and Services rely on can never be replaced.
  • nodeSelector, tolerations and affinity pass through to the pod spec unchanged. All three controllers already replace the whole pod template on update, so changing or removing a spec.pod field rolls the Deployment and drops the field.
  • Tests: internal/controller/pod_spec_test.go covers every field and the operator-label precedence across all three CRDs, and the unset case (nothing added to the template).
  • Regenerated deepcopy, CRDs and manifests/ - README documents spec.pod with an example.

task lint (0 issues), task test and task fmt/go vet all pass locally.

Downstream impact

The CRD schemas changed, so an install pinned to manifests/ picks this up on the next release - no migration needed, spec.pod is optional. User-facing, so a [DOCS] ticket is filed in inference-gateway/docs.

Closes #308

@inference-gateway-maintainer
inference-gateway-maintainer Bot requested a review from a team as a code owner October 31, 2026 23:01
@edenreich
edenreich merged commit 62e951b into main Oct 31, 2026
1 check passed
@edenreich
edenreich deleted the feat/issue-308-20261031-2255 branch October 31, 2026 23:11
inference-gateway-releaser Bot added a commit that referenced this pull request Oct 31, 2026
## [0.30.0](v0.29.0...v0.30.0) (2026-10-31)

### ✨ Features

* **api:** add spec.pod to Gateway, Agent and MCP ([#309](#309)) ([62e951b](62e951b))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.30.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Pod labels, annotations and scheduling for Gateway, Agent and MCP workloads

1 participant