Skip to content

test(k8s): verify the LiteLLM gateway v1.103.10 rollout #4373

Not planned

Description

@devops-cli-service

Split from #4370.

The item asks for a post-merge check of the gateway image, the rollout status and an ask-jev call. A pull request cannot run this check: it needs the merged manifest, the live cluster and the tunnel. This part is deferred so the image bump can merge. Acceptance criteria: 1. kubectl -n llm get deploy llm-gateway -o jsonpath='{.spec.template.spec.containers[0].image}' prints ghcr.io/berriai/litellm:v1.103.10. 2. kubectl -n llm rollout status deploy/llm-gateway ends with successfully rolled out. 3. `uv run devops ai ask-jev noul

Proposed design

Problem statement

The gateway image bumps to v1.103.10 in #4370, and that pin is merged in k8s/llm/gateway/deployment.yaml:33. No repeatable check confirms that the live cluster runs that image, that the rollout finishes, and that the gateway answers a TypeSafe Jev call through the tunnel. A pull request cannot run these checks, so the project needs one command that a person runs after the merge and at each gateway bump, and that a test can check offline. The command compares the image that Deployment llm/llm-gateway reports with the merged manifest pin, waits for the rollout, and makes one Jev call through the gateway.

Acceptance criteria

Requirement: Live image check

The command SHALL compare the image that Deployment llm/llm-gateway reports with the image pinned in k8s/llm/gateway/deployment.yaml and MUST exit 1 when they differ.

Scenario: Image tag differs

  • WHEN the process fake answers kubectl get deployment llm-gateway -n llm with an image tag other than ghcr.io/berriai/litellm:v1.103.10
  • THEN the command exits 1 and the report prints the manifest image and the image the Deployment reports

Requirement: Rollout check

The command SHALL run kubectl rollout status deployment/llm-gateway -n llm --timeout=<seconds> and MUST exit 1 when kubectl exits non-zero.

Scenario: Rollout stays pending

  • WHEN the process fake answers the rollout command with exit code 1 and the line Waiting for deployment "llm-gateway" rollout to finish
  • THEN the command exits 1 and prints that rollout line

Requirement: Gateway answer check

The command SHALL send one noul question to TypeSafe Jev through the gateway, with the observed image and rollout line as its context, and MUST exit 1 when the call raises an error.

Scenario: Gateway gives no answer

  • WHEN the HTTP fake answers the System One request with status 500
  • THEN the command exits 1 and prints the gateway error text

Requirement: Pass report

The command SHALL print the live image, the rollout line and the Jev answer with its probability, and MUST exit 0 when the three checks pass.

Scenario: All checks pass

  • WHEN the Deployment reports ghcr.io/berriai/litellm:v1.103.10, the rollout exits 0 and the System One request answers a noul reply
  • THEN the command exits 0 and prints the image, the rollout line and the answer with its probability

Requirement: Dry run

The command SHALL print both kubectl commands and the Jev question with --dry-run and MUST start no process and send no request.

Scenario: Dry run lists the calls

  • WHEN a person runs devops k8s gateway-check --dry-run with the process fake and the HTTP fake installed
  • THEN the output lists the two kubectl commands and the Jev question, and both fakes record no call

Existing Tool Considered

No alternatives check has run on this item. The need is to compare the image of Deployment llm/llm-gateway with the merged manifest, wait for its rollout, and make one Jev call through the gateway. kubectl (Apache-2.0, maintained by the Kubernetes SIG CLI) covers the image read and the rollout wait (src/devops_cli/k8s/manifest_plans.py:250). The in-repo client ask_jev in src/devops_cli/ai/jev_ask.py:215 covers the Jev call through the gateway, and the existing test test_gateway_deployment_pins_litellm_and_reads_master_key_from_secret (tests/ai/benchmark/test_k8s_llm_gateway.py:830) covers the pin offline. Neither gives one command with one exit code that a person runs after a merge. The change adds devops k8s gateway-check: a module in src/devops_cli/k8s/gateway_check.py (the manifest pin, the kubectl commands, the Jev question, the verdicts), a thin command in src/devops_cli/commands/k8s/gateway_check.py, two test files and a README bullet, in the shape of devops k8s crawl4ai-check. Written cost to build, keep and fix that code: about 45,000 tokens and half a day of elapsed time.

Key questions

  • Which commands check the gateway image and the rollout status?: The image read is kubectl get deployment llm-gateway -n llm -o jsonpath='{.spec.template.spec.containers[0].image}', with --context when the caller names one. The rollout check is kubectl rollout status deployment/llm-gateway -n llm --timeout=<seconds>; it exits non-zero when the rollout does not finish, and a Deployment with replicas: 1 and the default RollingUpdate strategy is a workload that it accepts. [sources: src/devops_cli/ai/gateway_tune.py:324, src/devops_cli/ai/gateway_tune.py:341, src/devops_cli/k8s/manifest_plans.py:250, openspec/changes/archive/2026-11-10-4370-bump-the-litellm-gateway-to-v1/tasks.md:17, openspec/changes/archive/2026-10-24-2186-volume-move/design.md:42, k8s/llm/gateway/deployment.yaml:12]
  • What does the truncated third acceptance criterion require, which stops after uv run devops ai ask-jev noul?: The body truncates the criterion after the kind noul, and the command needs a question argument, so no recoverable text names the prompt. The command sends a fixed closed noul question with the evidence of the first two steps as its context: Does this gateway rollout show the pinned image and a finished rollout?, with --context "<image>\n<rollout line>". It passes when ask_jev returns a typed answer, and fails only when the call raises. The report prints the answer and its probability, and the command does not gate on the probability, because a Jev answer is evidence and not a verdict. (best practice) [sources: docs/adr/0019-a-decision-step-asks-jev-short-closed-questions-about-evidence-that-tools-extract.md:17, .agents/skills/ask-jev/SKILL.md:14, .agents/skills/ask-jev/SKILL.md:43, k8s/README.md:130, src/devops_cli/ai/jev_ask.py:215]
    • Chosen: Fixed closed noul question about the extracted evidence. ADR 0019 records that Jev works on short, closed questions about evidence that tools extract, and the image and rollout line are that evidence. One answered request proves the gateway pass-through route works.
    • Rejected: The bare uv run devops ai ask-jev noul that the body leaves. The command takes the question as a required argument, so this call fails validation and proves nothing about the gateway.
    • Rejected: A direct curl to POST /v1/systemone. It duplicates the client path that ask_jev and tests/ai/test_jev_gateway_route.py already cover, and the issue asks for the ask-jev call.
  • Which image tag must the check expect?: ghcr.io/berriai/litellm:v1.103.10, the pin in the merged manifest, which the benchmark constant GATEWAY_IMAGE also holds and the benchmark test compares with the manifest. [sources: k8s/llm/gateway/deployment.yaml:33, tests/ai/benchmark/test_k8s_llm_gateway.py:78, tests/ai/benchmark/test_k8s_llm_gateway.py:843]
  • Where does the verification live, and how do offline tests check it?: It is the command devops k8s gateway-check: src/devops_cli/k8s/gateway_check.py holds the manifest pin, the kubectl commands, the Jev question and the verdicts, src/devops_cli/commands/k8s/gateway_check.py is the thin adapter with --context and --dry-run, and the tests live in tests/k8s/test_gateway_check.py and tests/commands/k8s/test_k8s_gateway_check.py. The offline tests install ProcessFake for the two kubectl calls and WebFake for the System One request, the seams that ADR 0007 names for a process and a network edge. (best practice) [sources: openspec/specs/k8s-crawl4ai-check/spec.md:4, openspec/specs/k8s-crawl4ai-check/spec.md:8, src/devops_cli/commands/k8s/crawl4ai_check.py:115, docs/adr/0007-tests-double-only-process-edges.md:3, docs/adr/0007-tests-double-only-process-edges.md:31, k8s/README.md:851]
    • Chosen: A devops k8s gateway-check command with --dry-run and the process and HTTP fakes. The project records this shape for a live check that a person runs: devops k8s crawl4ai-check and its capability spec give the module, the thin command, the request-plan dry run and the offline tests. A test of src/ doubles the process and network edges and starts no program (ADR 0007).
    • Rejected: A shell script in a scripts/ directory with stub executables on PATH. The commit has no scripts/ directory, and a stub-based test would start a program from a test of src/, which the 2026-10-24 amendment of ADR 0007 forbids. The command shape already covers the same calls with a testable seam.
    • Rejected: A row of devops ci. ADR 0007 sends a real tool to a devops ci row for checks of committed files; this check reads the live cluster and the tunnel, so it cannot run on a runner. The offline part is already the benchmark test of the pin.
  • Where does the expected image come from?: From the committed manifest: the check reads the image of container litellm in k8s/llm/gateway/deployment.yaml and compares it with the image the Deployment reports. No new constant is added, so the check runs unchanged at each gateway bump. (best practice) [sources: k8s/llm/gateway/deployment.yaml:32, k8s/llm/gateway/deployment.yaml:33, k8s/llm/gateway/kustomization.yaml:14, src/devops_cli/k8s/image_pins.py:144, src/devops_cli/k8s/image_pins.py:162, tests/gate/k8s_checks/devops_runtime.py:64]
    • Chosen: Read the pin from k8s/llm/gateway/deployment.yaml. One source of truth: the file that Argo CD and kubectl apply -k k8s/llm/gateway apply, with no images: override in the kustomization. image_values in src/devops_cli/k8s/image_pins.py already reads image values from manifests, so the parser exists.
    • Rejected: A GATEWAY_CHECK_IMAGE constant plus a gate row. It duplicates the pin and needs a test to keep the constant in step, as the Crawl4AI check does. The benchmark test already ties the manifest to GATEWAY_IMAGE, so a second copy adds a failure mode without a check.
    • Rejected: Accept whatever image the rollout runs. The check would then pass on the stale pod that this issue exists to catch.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#4370

Activity

  1. added
    source/agent
    type/test
    scope/k8s
    status/new
    value/medium
    effort/low
    on Nov 10, 2026
  2. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    ContributorAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/test. The test prefix of the title gives the type.
    • Scope: scope/k8s. The (k8s) scope of the title gives the scope.
    • Priority: P2-Medium. The check confirms that the security image bump is live, but it blocks no merge.
    • Value: Medium. The check shows that the gateway runs the fixed image and answers a call.
    • Effort: Low. The work is three commands that run on the cluster.
    • Related: fix(k8s): bump the LiteLLM gateway to v1.103.10 for advisories #4370, which asks for a different change. Both items concern the LiteLLM v1.103.10 bump, but #4370 changes the manifest and this item verifies the live rollout.
  3. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    ContributorAuthor

    Refine cannot set this item to Ready at 04db2fc. A bot opened the item, so a review of the issue and of the proposal must approve it first. The review found the defects below. A person edits the body to answer them. The next refine round looks at the item again only after a body edit.

    • false_premise at problem_statement: The plan states that the v1.103.10 pin is already merged. The issue defers this work until the image bump merges. Evidence: "that pin is merged in k8s/llm/gateway/deployment.yaml:33"
    • missing_path at existing_tool: The plan adds the module src/devops_cli/k8s/gateway_check.py. No task group creates it. Evidence: "a module in src/devops_cli/k8s/gateway_check.py"
    • false_premise at existing_tool: The plan states that ask_jev is in src/devops_cli/ai/jev_ask.py. files holds no entry for that path. Evidence: "The in-repo client ask_jev in src/devops_cli/ai/jev_ask.py:215 covers the Jev call through the gateway"
  4. dan-petty commented on Nov 26, 2026

    @dan-petty
    Owner

    Closed: the version to verify is gone.

    The gateway manifest moved to dan-petty/homelab and now names LiteLLM 1.111.0 (k8s/llm/gateway/deployment.yaml), so a check for v1.103.10 cannot pass. A repeatable gateway check (devops k8s gateway-check) is designed in #4885. Add the image and rollout read there if you want it.

  5. removed
    status/new
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/k8ssource/agenttype/testvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions