Skip to content

feat(k8s): dynamically generate devops configmap from active config and gitignore #1231

Closed

Description

@dan-petty

Template k8s/devops/configmap.example.yaml without concrete repo/user references, gitignore k8s/devops/configmap.yaml, and dynamically generate it from active configuration during deploy-stack.

Activity

  1. added this to the v0.2.27 milestone on Oct 5, 2026
  2. added
    type/feature
    scope/k8s
    priority/p2-medium
    source/agent
    on Oct 5, 2026
  3. dan-petty-bot commented on Oct 5, 2026

    @dan-petty-bot
    Collaborator

    What changed

    #1232, merged into release/v0.2.27 as fb74c3f.

    Summary

    Fixes #1231

    This pull request sanitizes the devops cluster ConfigMap template and dynamically generates the runtime configuration from active settings during deployment:

    • Establishes k8s/devops/configmap.example.yaml as the committed template with sanitized placeholder repositories (owner/repo) and machine account (devops-bot).
    • Untracks k8s/devops/configmap.yaml and adds /k8s/devops/configmap.yaml to .gitignore, preventing user repos and personal machine account names from being committed.
    • Adds devops_cli.k8s.configmap (ensure_devops_configmap, render_devops_configmap_content) to dynamically generate k8s/devops/configmap.yaml from active settings (service.repos, service.machine_account, or k8s.github_account) when running devops k8s deploy-stack, while preserving existing repos and settings if active configuration is unset.
    • Integrates ensure_devops_configmap into _render_kustomize_dir in template.py and _apply_single_manifest in stack_lifecycle.py to ensure configmap.yaml is generated before kubectl apply or kubectl kustomize runs.
    • Adds comprehensive unit tests in tests/test_k8s_configmap.py and updates tests in tests/test_k8s_devops_runtime.py, tests/test_k8s_devops_stack.py, and tests/test_k8s_roadmap_service.py.

    14 file(s) changed.

    How it was verified

    Check runs at e0ca7e8:

    • Prune PR DevContainer Images: pass
    • CodeQL: pass
    • Static Analysis: pass
    • Analyze (actions): pass
    • Analyze (python): pass
    • Tests & Coverage: pass
    • DevContainer Image: skipping
    • Service Image: skipping
    • Dependency Freshness: skipping

    Acceptance Criteria of docs/agent/tasks/task-1231-k8s-devops-configmap-template.md:

    • k8s/devops/configmap.example.yaml is committed with sanitized placeholders.
    • /k8s/devops/configmap.yaml is ignored in .gitignore and untracked from git.
    • ensure_devops_configmap dynamically generates and synchronizes configmap.yaml from active configuration.
    • devops k8s deploy-stack --stack devops synchronizes configmap.yaml before applying manifests.
    • All 14 CI quality gates pass via uv run devops ci.
  4. added a commit that references this issue on Oct 6, 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

    priority/p2-mediumscope/k8ssource/agenttype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions