Skip to content

fix(k8s): Push the Qdrant read-only key so qdrant-0 starts #6064

Closed

Description

@dan-petty

Problem

Pod llm/qdrant-0 does not start, so the RAG index and each Qdrant read of the jobs are down. On 2026-11-16 the pod status is CreateContainerConfigError: "couldn't find key read-only-api-key in Secret llm/qdrant-api-key". The earlier pod failed in the same way more than 13,000 times. The live object holds only the key api-key.

Pull request #5725 (merged 2026-11-14) added QDRANT__SERVICE__READ_ONLY_API_KEY to k8s/llm/values-qdrant.yaml, which reads the key read-only-api-key. Argo CD synced the change before a person pushed the new key. This is the failure that row REL-9 of the production readiness guideline names: a new key must be in the cluster before the merge of the manifest that reads it. The same order broke Grafana on 2026-11-12 (#5193).

Expected behavior

  • A person pushes the key with devops k8s push-secrets --only llm/qdrant-api-key, and qdrant-0 becomes Ready.
  • The cause gets a check: a pull request that adds a reference to a key of a cluster credential fails, or shows a person step, when the generator table of devops k8s push-secrets has no row for that key. A live check (devops k8s push-secrets --only <namespace>/<name> --plan) shows unchanged before the merge.
  • An alert fires when a pod of a tier 1 or tier 2 service stays in CreateContainerConfigError.

Related

Source: #6059

Alternatives check of 2026-11-17: none.
Tool: none found.
Reason: Searches found only generic manifest linters and policy engines (kube-linter, conftest) plus cluster-side secret operators; none reads the generator table of devops k8s push-secrets, so none can flag a referenced key the table lacks before merge.

Lacks:

  • No knowledge of the push-secrets generator table rows
  • Checks manifest shape only, not keys of a named Secret
  • No live plan comparison that reports unchanged
  • No alert on a pod stuck in CreateContainerConfigError

Proposed design

Problem statement

Pod llm/qdrant-0 stopped in CreateContainerConfigError because Secret llm/qdrant-api-key held no key read-only-api-key. Pull request #5725 merged the manifest that reads the key before a person pushed the key. This item adds a test that fails when a secretKeyRef names a key that the generator table of devops k8s push-secrets has no row for. It also documents the live --plan check that must show unchanged before the merge. The immediate key push and the alert on a stuck pod go to new items.

Acceptance criteria

Requirement: Unknown credential key fails the check

The check SHALL report a failure when a secretKeyRef names a key that the generator table of devops k8s push-secrets has no row for.

Scenario: Qdrant read-only key has no row

  • WHEN The check gets a table with no read-only-api-key row for llm/qdrant-api-key, and k8s/llm/values-qdrant.yaml reads that key.
  • THEN The check reports a failure that names the file, llm/qdrant-api-key and read-only-api-key.

Requirement: Known credential key passes the check

The check SHALL pass when each secretKeyRef to a Secret of the generator table names a key of that Secret's row.

Scenario: Qdrant values as merged

  • WHEN The table holds api-key and read-only-api-key for llm/qdrant-api-key, and k8s/llm/values-qdrant.yaml reads both keys.
  • THEN The check reports no finding.

Requirement: Secret outside the table is skipped

The check MUST skip a secretKeyRef whose Secret name is not a row of the generator table.

Scenario: Chart-made Secret

  • WHEN A manifest under k8s/ reads a key of a Secret that the generator table does not name.
  • THEN The check reports no finding for that reference.

Requirement: Cluster Secrets section names the live check

The Cluster Secrets section of k8s/README.md SHALL name devops k8s push-secrets --only <namespace>/<name> --plan and its unchanged result as a step before the merge.

Scenario: Cluster Secrets section names the plan check

  • WHEN The documentation test reads the Cluster Secrets section of k8s/README.md.
  • THEN The section contains devops k8s push-secrets --only <namespace>/<name> --plan and says to merge only when the plan shows unchanged.

Existing Tool Considered

The alternatives check of 2026-11-17 in the issue body returned none. kube-linter and conftest check manifest shape only. Kyverno and OPA Gatekeeper read the live cluster, where the missing key is already the failure. The change builds a test in this repository. It costs about 30k tokens to write the check and its fixture, and about 8k tokens a year to keep it level with the table. It takes about 2 hours of elapsed time.

Key questions

  • Which open, maintained tool checks that a manifest reads only keys that devops k8s push-secrets generates?: No tool covers it. The alternatives check of 2026-11-17 found only manifest linters and policy engines. kube-linter and conftest check manifest shape only. Kyverno and OPA Gatekeeper read the live cluster, where the missing key is already the failure. The check is a test in this repository, because it reads the generator table. (best practice) [sources: docs/adr/0004-ci-is-the-authoritative-gate.md]
    • Rejected: kube-linter or conftest. It checks manifest shape and never reads the generator table, so it cannot tell a key that the table lacks.
    • Rejected: Kyverno or OPA Gatekeeper. It reads the live cluster after the Secret exists, so it cannot stop the merge that reads a missing key.
    • Chosen: Test in this repository. It reads the same generator table as the command and runs in the required check with no new workflow.
  • How does the check read the generator table with one copy of the data?: The check calls the row builder that devops k8s push-secrets uses. Its test passes the real rows. The table keeps one copy in the module that the push and its --plan mode use. (best practice) [sources: k8s/README.md, k8s/llm/values-qdrant.yaml]
    • Chosen: Import the row builder of the command. The test reads the same rows that the push writes, so a new row needs no second edit.
    • Rejected: Copy the rows into the test. The copy drifts from the table that the push writes.
    • Rejected: Call the CLI with a new flag. A new flag adds an interface that this check does not need.
  • Which check gates the pull request?: A test in the repository suite. The Tests & Coverage required check runs the suite on each pull request into main. The new test fails the merge with no new workflow and no new required check. (best practice) [sources: docs/adr/0004-ci-is-the-authoritative-gate.md]
    • Chosen: Test in the existing suite. The required check already runs it, and ADR 0004 keeps the check names fixed.
    • Rejected: New workflow and required check. ADR 0004 names the required checks, and a third name needs a ruleset change.
    • Rejected: Pre-push hook. A hook runs on the workstation, and the required check is the gate.
  • Which secretKeyRef entries does the check read?: Each secretKeyRef under k8s/ whose Secret name is a row of the generator table. The check leaves a Secret that the table does not name alone, because a chart or another controller makes that Secret. (best practice) [sources: k8s/llm/values-qdrant.yaml, k8s/README.md]
    • Rejected: Each secretKeyRef under k8s/. A chart makes some Secrets, so a key of those Secrets has no row and the check fails with no defect.
    • Rejected: Only the files that the pull request changes. A row that leaves the table breaks a manifest that the pull request does not change.
    • Chosen: Each secretKeyRef to a Secret that the table names. It covers each managed credential and reports no false finding for a chart-made Secret.
  • Where does the documentation name the live plan check?: In the Cluster Secrets section of k8s/README.md. That section already names devops k8s push-secrets, the keyring and the two keys of llm/qdrant-api-key. (best practice) [sources: k8s/README.md, k8s/llm/values-qdrant.yaml]
    • Chosen: The Cluster Secrets section of k8s/README.md. It is the one place that names the push and its order.
    • Rejected: A comment in k8s/llm/values-qdrant.yaml. A comment in one values file does not cover the other Secrets.
    • Rejected: A new document. A second copy of the Cluster Secrets steps drifts from the README.
  • Does devops k8s push-secrets have the --only and --plan flags, and does the plan print unchanged?: Yes. The plan path and the push path are tested. The plan output reports unchanged for a key that matches the keyring. [sources: tests/k8s/test_cluster_secret_plan.py, tests/k8s/test_cluster_secret_push.py]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    scope/k8s
    source/agent
    status/new
    effort/medium
    value/high
    on Nov 16, 2026
  2. dan-petty commented on Nov 16, 2026

    @dan-petty
    OwnerAuthor
  3. added
    priority/p0-critical
    on Nov 16, 2026
  4. dan-petty commented on Nov 16, 2026

    @dan-petty
    OwnerAuthor

    Step 1 is done: the owner pushed llm/qdrant-api-key at about 23:55Z (read-only-api-key created; statefulset/qdrant and statefulset/open-webui restarted). qdrant-0 is 1/1 Running. Qdrant was down from 22:19Z to 23:55Z (about 96 min).

    The item stays open for the other two points: the check before the merge and the alert on CreateContainerConfigError.

    Not part of this item: open-webui-0 stays Pending, because its volume is on node hawk, which has been NotReady and cordoned since 2026-11-13 04:40Z (#5143).

  5. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.

  6. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (10)

    Tools considered:

    Searches run:

    • conftest OPA policy secretKeyRef key allowlist manifest, results: 5
    • validate Kubernetes secretKeyRef key exists in Secret CI check, results: 5
    • Kyverno policy check that secretKeyRef key exists in Secret, results: 5
    • kube-linter built-in checks list secret, results: 5
    • conftest kubernetes manifests policy testing, results: 5
    • kube-linter, results: 5
    • "kube-linter" stackrox, results: 5
    • "secretKeyRef" validation tool github, results: 5
    • open-policy-agent conftest rego kubernetes secret, results: 5
    • kubernetes manifest linter missing secret key detection, results: 5

    Sources:

  7. added
    status/ready
    and removed
    status/new
    on Nov 17, 2026
  8. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

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

    Moved to new items: #6227, dan-petty/homelab#368.

  9. added
    status/in-progress
    and removed
    status/ready
    on Nov 17, 2026
  10. added
    status/in-review
    and removed
    status/in-progress
    on Nov 17, 2026
  11. removed
    status/in-review
    on Nov 18, 2026
  12. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-18 01:44 UTC

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/mediumpriority/p0-criticalscope/k8ssource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions