Skip to content

fix(k8s): a changed gateway ConfigMap rolls the gateway deployment, so deploy-stack never leaves a stale pod #1929

Closed

Description

@dan-petty

Problem

devops k8s deploy-stack --stack llm applies a changed gateway ConfigMap but does not restart the gateway. The gateway keeps serving the old model list until a person restarts it. The change that moves the gateway embedding group from bge-m3:latest to qwen3-embedding:0.6b (#481) found this.

Evidence

  • The task file of feat(ai): embeddings through the llm gateway, with embedding model evaluation #481 lists a person step to restart the gateway after the ConfigMap deploy, and the Trade-offs bullet says a person may file an issue.
  • A workload that reads a ConfigMap as a file or an environment value does not reload it when the ConfigMap changes.
  • The rule Mandatory Comprehensive Kubernetes Stack Deployment says that deploy-stack --stack all must deploy, synchronize and update all cluster resources. A deploy that leaves a stale pod does not meet it.

Remedy

Use an open mechanism and not a hand-written restart: either a configMapGenerator with a content-hash name in kustomize, so a changed ConfigMap changes the pod template and Kubernetes rolls the deployment, or a hash annotation on the pod template. Check whether the stack already uses kustomize or Helm for the gateway before choosing. Add a test that renders the manifests and shows that a changed ConfigMap changes the pod template. Do not run kubectl rollout restart from the deploy command.

Proposed design

Problem statement

A changed gateway ConfigMap does not restart the gateway pod. The pod keeps serving the old model list until manually restarted. This leaves a stale pod in the cluster.

Acceptance criteria

  • Criterion 1: A changed gateway ConfigMap triggers a rolling update of the gateway deployment
    Verification: Run 'devops k8s deploy-stack --stack llm' with a changed ConfigMap and verify the gateway pod restarts
  • Criterion 2: The deployment command does not use manual kubectl rollout restart
    Verification: Check that no 'kubectl rollout restart' command is present in the deploy-stack implementation
  • Criterion 3: The stack uses kustomize or Helm for the gateway
    Verification: Verify the gateway manifest files are managed by kustomize or Helm in the repository

Key questions

  • Does the stack already use kustomize or Helm for the gateway?: The context shows that kustomize is used for monitoring dashboards with configMapGenerator. The stack likely uses kustomize for the gateway as well. [sources: CONTEXT.md]
  • Should we use configMapGenerator with content-hash name or hash annotation on pod template?: Use configMapGenerator with content-hash name in kustomize as it is the preferred method for triggering rolling updates when ConfigMaps change. (proposed)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/bug
    on Oct 22, 2026
  2. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Type: type/bug. The candidate fixes a problem with gateway deployment behavior.
    • Priority: P1-High. A changed ConfigMap does not restart the gateway, leaving stale pods.
    • Value: High. Users see outdated model lists until manual restart occurs.
    • Effort: Medium. Requires changes to kustomize or Helm and adding a test.
  3. dan-petty commented on Oct 23, 2026

    @dan-petty
    OwnerAuthor

    Status set to Ready at f98ccd1 (see proposed design in issue body).

  4. dan-petty commented on Oct 23, 2026

    @dan-petty
    OwnerAuthor

    Re-scope from the #1654 work (2026-10-23). Argo CD renders k8s/llm with kustomize, and the native deploy-stack applies each llm file with kubectl apply -f. A hash annotation in plain manifests must be kept by hand and cannot meet "a changed ConfigMap changes the pod template". Proposed: put a configMapGenerator in k8s/llm/gateway/kustomization.yaml, apply the gateway with kubectl apply -k from deploy-stack after the Secret push, move the LiteLLM config into gateway/config.yaml, and point DEFAULT_LLM_GATEWAY_CONFIGMAP_PATH and devops ai gateway render at it. Note: the #1654 merge changes the gateway pod template, so it rolls the gateway pod that has run since 2026-10-05 onto the current ConfigMap once.

  5. added a commit that references this issue on Oct 24, 2026
    638703a
  6. added a commit that references this issue on Oct 24, 2026
    70e775f
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

    source/agenttype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions