Skip to content

fix(k8s): deploy-stack fetches a private Application repo #5294

Closed

Description

@dan-petty

Problem Description

devops k8s deploy-stack reads the live source of each homelab Application, fetches that repository at its revision, and renders it to find the host patches (stack_lifecycle.py:975-1012). The fetch in render_at_revision (src/devops_cli/k8s/argocd_overrides.py:97-108) gives git the SSH option only. It does not give git the credential of the GitHub session. So the fetch fails when the Application names a private repository.

After the switch (#5134, plan step 11), the Applications ingress and mattermost name the private repository dan-petty/homelab. deploy-stack must work during the soak, until #5134 step 5c (plan step 15) deletes this override path. infra/repo_tree.py:60 already adds the -c values of CONST_GIT_GITHUB_CREDENTIAL_CONFIG (config/constants.py:1185-1188).

Reproduction Steps

  1. Use a cluster where an Application that deploy-stack reads names a private GitHub repository.
  2. Run uv run devops k8s deploy-stack --stack infra --dry-run.
  3. The fetch of the private repository fails, because git has no credential.

Expected vs Actual Behavior

Expected: the fetch uses the credential of the GitHub session, as infra/repo_tree.py:60 does, and deploy-stack renders the Application.

Actual: render_at_revision runs git fetch with only CONST_GIT_NONINTERACTIVE_SSH_CONFIG, so a private repository cannot be read.

Environment Diagnostics

devops-cli main at 7a158c4. Found by reading the code for the homelab migration plan (#5120, phase 2). The cluster does not show the failure yet, because every Application names the public repository today.

Logs, Traces, or Terminal Output

None yet. The fix cites its fail-to-pass run (devops ci fail-to-pass --base <ref>).

Plan, check, rollback and dependencies

  • Plan step. Step 5 of the corrected plan on feat(infra): manage infra repos with devops infra #5120. One pull request in devops-cli. Add the -c values of CONST_GIT_GITHUB_CREDENTIAL_CONFIG to the fetch in render_at_revision, as infra/repo_tree.py:60 does.
  • Check. Cite the fail-to-pass run. deploy-stack --stack infra --dry-run fetches an Application that names a private repository. uv run devops ci passes.
  • Rollback. git revert.
  • Downtime. None.
  • Dependencies. None open. Release vX (plan step 6) must include it. feat(argocd): read the environment from the homelab repo #5134 needs the released fix before its step 3 (plan step 11). A person merges.

Source: #5120

Activity

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

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 13, 2026
  5. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor

    The check "deploy-stack --stack infra --dry-run fetches an Application that names a private repository" cannot pass as written. The dry run lists the Applications and returns before _homelab_host_overrides runs (_render_deploy_stack_dry_run in commands/k8s/stack_lifecycle.py), and a dry run makes no request. #5331 replaces it with a direct render_at_revision call through the runner of deploy-stack on the private repository: the fetch and the checkout pass. The same correction applies to step 5 of #5120. A full render from the private repository waits for its first kustomization (a later step of #5120).

  6. added
    status/in-review
    and removed
    status/in-progress
    on Nov 13, 2026
  7. removed
    status/in-review
    owner/agent
    on Nov 13, 2026
  8. devops-cli-service commented on Nov 13, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-13 02:28 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/lowpriority/p2-mediumscope/k8ssource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions