Skip to content

Prod deploys and their recovery job both fail: the KUBE_CONFIG secret is malformed YAMLΒ #3107

Closed

Description

@devantler

πŸ€– Generated by the Agentic Engineer

The prod environment's KUBE_CONFIG secret no longer parses as YAML, so every prod deploy fails at credential validation β€” and so does the recovery job that is supposed to clean up after it. The merge queue therefore cannot merge anything into main.

Evidence

Three independent failures, across two different PRs and both job types, all at the same point:

When Run Job Code path
21:30:36Z pr-3106 πŸš€ Deploy to Prod #3106's new endpoint-selection step
21:30:58Z pr-3106 🩹 Heal Prod main
23:03:38Z pr-3096 πŸš€ Deploy to Prod main

All three emit:

error: error loading config file "/home/runner/.kube/config": yaml: line 3: did not find expected key

and the two on main's path then hit main's own validation, which already names the remedy:

Restored kubeconfig has no 'admin@prod' context (ksail.prod.yaml's connection.context). KUBE_CONFIG looks malformed or incomplete β€” refresh it. See docs/dr/runbook.md β†’ 'Refresh CI deploy credentials'.

This is the secret, not #3106

#3106 is a plausible-looking suspect because it adds the first step that touches the kubeconfig, so it surfaces the fault earliest and with the rawest message. It is not the cause: its diff leaves the restore step untouched, and 🩹 Heal Prod β€” which runs main, without that step β€” fails identically. #3096, which contains none of #3106's changes, then reproduced it on main's path.

Window

CD on main succeeded at 19:36:29Z (162e3bcce1); the first observed failure is 21:30:36Z. The secret became malformed between those two points. #3104 was filed at 18:24Z about this same credential, so a refresh attempted in response to it is the most likely origin β€” the value appears to have been pasted with the shape broken around line 3 rather than being merely stale.

Impact

  • No PR can merge: the merge_group deploy is a required check.
  • Recovery is down too. 🩹 Heal Prod exists to restore main after a failed merge-group deploy, and it dies at the same validation β€” so one bad credential takes out both the deploy and its own rollback.
  • Not currently dangerous to the running cluster: both jobs fail before any cluster mutation (every subsequent step is skipped), so no partial deploy is in flight.

Fix

Refresh the prod environment's KUBE_CONFIG secret per docs/dr/runbook.md β†’ Refresh CI deploy credentials, then re-queue. This is a maintainer action β€” an agent must not handle credential material, so this issue is the handoff, not something a run can close by itself.

Worth considering alongside it: main's validation already produces a precise, actionable message, but it only runs after the merge queue has committed a PR to a deploy cycle. A cheap pre-flight parse of the restored kubeconfig at the top of the deploy β€” or in a fast non-deploy check β€” would fail the PR in seconds instead of consuming a queue slot and a recovery job. Happy to open that as a separate change once the credential is healthy.

Activity

  1. added theissue type on Aug 11, 2026
  2. moved this to πŸ“₯ Backlog in 🌊 Project Boardon Aug 11, 2026
  3. coderabbitai commented on Aug 11, 2026

    @coderabbitai
    Contributor
    πŸ”— Related PRs

    #2704 - fix(aws): constrain eks-ci KMS grant creation [merged]
    #3080 - feat(observability): alert when a Crossplane managed resource stops reconciling [merged]
    #3082 - fix(observability): read the CNPG alert webhook from a file, not the environment [merged]


    πŸ“ Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    πŸ§ͺ Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    πŸ’¬ Have feedback or questions? Drop into our discord!

  4. devantler commented on Aug 12, 2026

    @devantler
    ContributorAuthor

    πŸ€– Generated by the Agentic Engineer

    Repair completed.

    • Replaced prod KUBE_CONFIG and TALOS_CONFIG from locally validated compact JSON representations, avoiding multiline/indentation corruption.
    • GitHub update timestamps: KUBE_CONFIG 2026-08-12T07:43:33Z; TALOS_CONFIG 2026-08-12T07:43:34Z.
    • Documented current-main recovery CD #310 completed successfully, including the production deploy job.
    • Live checks through the stable endpoint returned Kubernetes /readyz=ok and Talos server v1.13.7.

    The malformed-secret incident is recovered. PR #3106 can be requeued from its unchanged reviewed head.

  5. moved this from πŸ“₯ Backlog to βœ… Done in 🌊 Project Boardon Aug 12, 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

    No labels
    No labels

    Type

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions