Skip to content

fix(samples): make the Gateway and MCP samples pass CRD validation - #329

Merged
edenreich merged 2 commits into
mainfrom
fix/gateway-hpa-samples
Nov 8, 2026
Merged

edenreich merged 2 commits into
mainfrom
fix/gateway-hpa-samples

Conversation

@edenreich

@edenreich edenreich commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Gateway samples in config/samples failed CRD validation, and kubectl kustomize config/samples failed outright because kustomization.yaml listed a core_v1alpha1_gateway.yaml that did not exist.

  • core_v1alpha1_gateway_hpa.yaml and core_v1alpha1_gateway_simple_hpa.yaml are replaced by one core_v1alpha1_gateway.yaml, the file the kustomization already lists. It keeps what the HPA samples showed in the current hpa.config shape: CPU and memory targets, minReplicas and maxReplicas, and scale-up and scale-down stabilization windows. Providers use the current env shape.
  • The custom http_requests_per_second Pods metric stays as a commented block. It needs a metrics adapter such as prometheus-adapter, and without one the HPA never scales down.
  • The MCP sample keeps its tls block with enabled: false and gains the secretName the CRD requires even when TLS is off. Before, the API server refused the sample.
  • TestExamplesUseKnownFields now strict-decodes config/samples/*.yaml as well as examples/, and decodes GPU manifests too.

Closes #327

Verification

  • task test passes. With the old core_v1alpha1_gateway_simple_hpa.yaml put back, the test fails with unknown field "maxReplicas".
  • On a k3d cluster with manifests/crds.yaml, kubectl kustomize config/samples | kubectl apply --dry-run=server -f - accepts all seven samples, and every manifest under examples/ also passes a server dry run.

The strict decode catches unknown fields but not a missing required field such as the MCP sample's secretName. Only the server dry run caught that one.

Cross-repo impact

  • no docs ticket: the samples live only in this repository

The two Gateway HPA samples used fields the API no longer has, and
kustomization.yaml listed a core_v1alpha1_gateway.yaml that did not exist,
so kubectl kustomize config/samples failed. One core_v1alpha1_gateway.yaml
with the current hpa.config and provider env shape replaces both.

The MCP sample set tls with enabled false but no secretName, which the CRD
requires. Leaving tls out already means no TLS.

TestExamplesUseKnownFields now strict-decodes config/samples as well, and
GPU manifests too.
@edenreich
edenreich requested a review from a team as a code owner November 8, 2026 21:57
…tings

The MCP sample keeps tls with enabled false and gains the secretName the
CRD requires even when TLS is off. The Gateway sample keeps what the old
HPA samples showed in the current hpa.config shape: a memory target and
scale-up and scale-down stabilization windows. The custom Pods metric stays
as a commented block, since the HPA never scales down without a metrics
adapter serving it.
@edenreich
edenreich merged commit e2e5d2a into main Nov 8, 2026
1 check passed
@edenreich
edenreich deleted the fix/gateway-hpa-samples branch November 8, 2026 22:19
inference-gateway-releaser Bot added a commit that referenced this pull request Nov 8, 2026
## [0.33.0](v0.32.0...v0.33.0) (2026-11-08)

### ✨ Features

* **gateway:** tune MCP health polling with spec.mcp.healthCheck ([#328](#328)) ([ff0867c](ff0867c))
* **orchestrator:** give spec.mcp.servers names and headers in the pod's mcp.yaml ([#324](#324)) ([56f4ff8](56f4ff8)), closes [#321](#321)
* **orchestrator:** pass through binding Service annotations and labels ([#320](#320)) ([d543db8](d543db8))

### ♻️ Improvements

* **orchestrator:** export the status contract from api/v1alpha1 ([#330](#330)) ([4b5d854](4b5d854))

### 🐛 Bug Fixes

* **examples:** serve the example MCP servers over stateless MCP 2026-07-28 ([#325](#325)) ([6d34978](6d34978)), closes [#323](#323)
* **samples:** make the Gateway and MCP samples pass CRD validation ([#329](#329)) ([e2e5d2a](e2e5d2a))

### 👷 CI

* **deps:** bump the gomod group with 4 updates ([#319](#319)) ([67f1bde](67f1bde))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.33.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 Nov 8, 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.

[BUG] Gateway HPA samples in config/samples fail CRD validation

1 participant