Repository navigation
Description
Context & Rationale
k8s/llm/portkey/deployment.yaml:32 ran :latest with imagePullPolicy: IfNotPresent, so each node kept whichever build it pulled first, until #738 pinned it to portkeyai/gateway:1.15.0. LightLLM, the other :latest workload, was removed in #727. Every workload image under k8s/ now has an explicit tag, but nothing stops a :latest tag from coming back. k8s/llm/valkey.yaml:40-47 starts the shared Valkey with no --maxmemory and no eviction policy under a 2048Mi limit. LiteLLM (gateway/deployment.yaml:60), Portkey (portkey/deployment.yaml:46) and Open WebUI websockets (values-open-webui.yaml:47) all write to it. The bundled knowledge base says to always set both (valkey.md:132), and k8s/llm/valkey-runs.yaml:80-81 already does (512mb, noeviction). No test asserts either manifest. No CI step runs Checkov or kube-linter. The native fallback checks only Dockerfile FROM tags (security/checkov.py:53), and devops k8s lint prints "passed" when kube-linter is absent (commands/k8s/security_audit.py:92).
Scope & Deliverables
- Context & Rationale*:
k8s/llm/portkey/deployment.yaml:32ran:latestwithimagePullPolicy: IfNotPresent, so each node kept whichever build it pulled first, until fix(k8s): restore kubernetes cpu metrics and align monitoring dashboards to homelab-k3s (#737) #738 pinned it toportkeyai/gateway:1.15.0. LightLLM, the other:latestworkload, was removed in chore(ai): remove unused lightllm inference backend #727. Every workload image underk8s/now has an explicit tag, but nothing stops a:latesttag from coming back.k8s/llm/valkey.yaml:40-47starts the shared Valkey with no--maxmemoryand no eviction policy under a 2048Mi limit. LiteLLM (gateway/deployment.yaml:60), Portkey (portkey/deployment.yaml:46) and Open WebUI websockets (values-open-webui.yaml:47) all write to it. The bundled knowledge base says to always set both (valkey.md:132), andk8s/llm/valkey-runs.yaml:80-81already does (512mb,noeviction). No test asserts either manifest. No CI step runs Checkov or kube-linter. The native fallback checks only DockerfileFROMtags (security/checkov.py:53), anddevops k8s lintprints "passed" when kube-linter is absent (commands/k8s/security_audit.py:92). - Deliverable*: One PR. No image needs pinning: LightLLM was removed in chore(ai): remove unused lightllm inference backend #727, and fix(k8s): restore kubernetes cpu metrics and align monitoring dashboards to homelab-k3s (#737) #738 pinned Portkey. In
k8s/llm/valkey.yaml, add--maxmemorybelow the 2048Mi limit and--maxmemory-policy volatile-lru, mirroringvalkey-runs.yaml. Assert the flag pair for both manifests intests/test_k8s_valkey_stack.py. Commitk8s/.checkov.yaml(framework: kubernetes,check: CKV_K8S_14,skip-path: coredns/deployment-patch.yaml) and add one CI step that runs a pinned Checkov overk8s/. Checkov finds the file itself and exits non-zero on failure. No wrapper change is needed.devops scan report --scanner checkov --fail-onalready exits 1 for local use (commands/scan.py:851-852), anddevops valkey info --section memoryalready prints the memory fields. - Constraint*: Routing CI through the devops wrapper would fail open. When the binary is missing, the wrapper silently runs the native fallback (
security/base.py:93-97), which has no k8s tag check. That fix belongs with the delivered fix(review): the static scan reports a clean result when its scanners are not installed #516 analyzer states (ai/review/pipeline.py:845) and the Gate Integrity draft, not here. The coredns patch has no image and no kustomization renders it, so it is skipped by path.allkeys-lrucould evict Open WebUI's websocket state.volatile-lruevicts only keys with a TTL and refuses writes when none remain, which is better than an OOM kill. Digest pinning (CKV_K8S_43) fails on every workload, and Dependabot covers onlygithub-actionsandpip. Digests therefore wait for Finding Baseline for Incremental Scan Gate Adoption and a Kubernetes-aware updater such as Renovate. A 0.0.0.0 rule is wrong here, because in-pod servers must listen on all interfaces. Host exposure comes fromNodePortservices, most documented as local-minikube choices. Ollama now runs as the per-VRAM-tier DaemonSets ink8s/llm/profiles/ollama-profiles.yaml, which replacedk8s/llm/ollama.yamland set nohostPort. Compose${VAR:?}and loopback checks have no target in devops-cli. - Measured*:
uvx --from checkov==3.3.19 checkov -d k8s --framework kubernetes --check CKV_K8S_14,CKV_K8S_43 -o json:CKV_K8S_14failed in 3 files (lightllm, portkey, coredns patch).CKV_K8S_43failed in 13, with none passing. The same Checkov over a copy ofk8s/with the proposed.checkov.yamlgave 2 failures and a non-zero exit. These counts predate chore(ai): remove unused lightllm inference backend #727 (LightLLM removed) and fix(k8s): restore kubernetes cpu metrics and align monitoring dashboards to homelab-k3s (#737) #738 (Portkey pinned). Only the coredns patch should now failCKV_K8S_14, so the run with the proposed.checkov.yamlshould pass. Re-measure before quoting new figures.grep -rEn '^\s*type: NodePort' k8s | wc -lgave 10 when filed and gives 6 now. - Source*: vibes
resources/docker-compose/docker-compose.yml, vibesresources/docker-compose/.env.example, vibesresources/k8s/observability/valkey-statefulset.yaml, vibesresources/k8s/observability/jaeger-deployment.yaml
Strategic Alignment
Proposed design
Problem statement
The Kubernetes LLM stack has two main issues: 1) It uses :latest Docker image tags that can lead to inconsistent deployments across nodes, and 2) The shared Valkey instance lacks memory limits which could cause out-of-memory errors under high load. These issues affect deployment consistency and system stability.
Acceptance criteria
- Criterion 1: All Kubernetes manifests use pinned image tags instead of
:latest
Verification: Rungrep -r ':latest' k8s/and verify no results are returned - Criterion 2: Valkey manifests have
--maxmemoryand--maxmemory-policyconfigured
Verification: Verify thatk8s/llm/valkey.yamlincludes--maxmemory 2048mband--maxmemory-policy volatile-lru - Criterion 3: Test suite validates the Valkey configuration in all manifests
Verification: Runpytest tests/test_k8s_valkey_stack.pyand verify all tests pass - Criterion 4: Checkov CI step runs with proper configuration
Verification: Verify that a CI step exists that runscheckov -d k8s --framework kubernetes --check CKV_K8S_14with the proposed.checkov.yamlconfiguration
Key questions
- Are all images under
k8s/already pinned to explicit tags?: Yes, every workload image underk8s/now has an explicit tag, but nothing stops a:latesttag from coming back. [sources: k8s/llm/portkey/deployment.yaml:32] - What is the current Valkey memory configuration in
k8s/llm/valkey.yaml?: It starts the shared Valkey with no--maxmemoryand no eviction policy under a 2048Mi limit. [sources: k8s/llm/valkey.yaml:40-47] - What eviction policy should be used for Valkey?:
volatile-lruevicts only keys with a TTL and refuses writes when none remain, which is better than an OOM kill. [sources: docs/agent/tasks/task-711-pinned-image-tags-and-bounded-shared-valkey-in-the-llm-stack.md:17] - What is the target memory limit for Valkey?: The 2048Mi limit should be maintained, with
--maxmemoryset below this limit. [sources: docs/agent/tasks/task-711-pinned-image-tags-and-bounded-shared-valkey-in-the-llm-stack.md:16] - Should we add a checkov configuration file?: Yes, commit
k8s/.checkov.yamlwithframework: kubernetes,check: CKV_K8S_14, and skip-path for coredns patch. (proposed) [sources: docs/agent/tasks/task-711-pinned-image-tags-and-bounded-shared-valkey-in-the-llm-stack.md:16]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn Review
Activity
dan-petty commentedon Sep 30, 2026
Moved from v0.2.25 to the backlog. v0.2.25 is capped at 12 items (#740), and only the next two planned releases keep a milestone (#739), so P2 items wait in the backlog until reprioritization pulls them in.
dan-petty commentedon Oct 18, 2026
Status set to Ready at 25e2cda (see proposed design in issue body).
dan-petty commentedon Oct 24, 2026
The premise of the item fails against the current codebase.
Checkov does not find k8s/.checkov.yaml when invoked from the repository root without --config-file. When executed with --config-file k8s/.checkov.yaml -d k8s, Checkov 3.3.19 exits with code 1.
Two workloads fail check CKV_K8S_14: k8s/devops/cronjob.yaml and k8s/devops/roadmap-service/deployment.yaml. Both specify ghcr.io/dan-petty/devops-cli/service without an image tag. These manifests were added in v0.2.26 after issue #711 was filed.
According to k8s/README.md, Git keeps the service image untagged by design. Argo CD Image Updater dynamically writes the digest to Application.spec.source.kustomize.images. Adding image tags in Git contradicts this design.
Adding k8s/devops workloads to skip-path is compensating code outside the item specification. The item cannot be built as written.
fix(k8s): the shared llm valkey has a memory bound below its containe…
chore(main): release 0.4.0 (#1960)
feat(monitoring): alert when a noeviction Valkey nears its bound (#2615)