Skip to content

feat(k8s): devops k8s bootstrap-roadmap-key command #5741

Closed

Description

@dan-petty

Problem or Motivation

The roadmap Service Deployment (devops/roadmap-service) reads DEVOPS_CLI_AI_API_KEY from key api-key of Secret roadmap-service-llm-key (#3685, #5703).
Currently, an operator must perform multiple manual steps to bootstrap this key:

  1. Extract the gateway master key from Kubernetes Secret llm/llm-gateway-secrets.
  2. Make a POST /key/generate HTTP request to the LiteLLM gateway admin API with model list, budget, and rate limit settings.
  3. Store the minted virtual key into the local OS keyring (roadmap_service.llm_key).
  4. Push the Secret to Kubernetes via devops k8s push-secrets --only devops/roadmap-service-llm-key.

If these steps are not performed, the roadmap-service pod enters CreateContainerConfigError with Error: secret "roadmap-service-llm-key" not found.

Proposed Solution & Architectural Design

Add a dedicated CLI command devops k8s bootstrap-roadmap-key:

  • Signature:
    devops k8s bootstrap-roadmap-key [OPTIONS]
    Options:
    • --context: Kubernetes context (default: active / homelab-k3s).
    • --models: Model pattern or list for the virtual key (default: devops-*).
    • --budget: Maximum budget in USD (default: 50.0).
    • --rpm: Requests-per-minute limit (default: 60).
    • --alias: Key alias on LiteLLM gateway (default: roadmap-service).
    • --force: Mint a new key even if one is already stored in the keyring.
    • --dry-run: Preview planned actions without writing to gateway, keyring, or cluster.
  • Workflow:
    1. Retrieve the gateway master key from Secret/llm/llm-gateway-secrets.
    2. Resolve the LiteLLM gateway URL.
    3. Call POST /key/generate with the specified alias, budget, rpm limit, and models.
    4. Store the minted key in the OS keyring under roadmap_service.llm_key.
    5. Write or push Secret roadmap-service-llm-key with key api-key in namespace devops.
    6. Display clear success output with masked key.

Target Subsystem

Kubernetes & Minikube Automation (src/devops_cli/commands/k8s/)

Existing Tool Considered

LiteLLM gateway provides /key/generate, and kubectl manages secrets, but no existing command coordinates extracting the cluster admin key, calling the gateway API, updating the OS keyring, and pushing the Secret. Building this subcommand reuses existing k8s, HTTP, and keyring helpers.
Cost: 100k agent tokens, 0.25 day.

Standards Compliance

  • Aligns with AGENTS.md engineering principles (cyclomatic complexity <= 10, nesting <= 4 blocks, zero bare exceptions, test-first).
  • Includes automated unit tests and dry-run verification.

Activity

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

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 14, 2026
  4. added
    status/in-review
    and removed
    status/in-progress
    on Nov 14, 2026
  5. removed
    status/in-review
    owner/agent
    on Nov 14, 2026
  6. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor
  7. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-14 22:29 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/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions