Skip to content

feat(k8s): add the Crawl4AI token to the cluster secrets #3882

Closed

Description

@dan-petty

Problem

The Crawl4AI service (planned in the next issues) refuses to listen beyond loopback without CRAWL4AI_API_TOKEN. Its entrypoint binds 127.0.0.1 when no token is set (https://raw.githubusercontent.com/unclecode/crawl4ai/v0.9.5/deploy/docker/entrypoint.sh, read 2026-11-07). No credential, cluster Secret row or table entry for this token exists in src/devops_cli/config/env.py, src/devops_cli/k8s/cluster_secrets.py or k8s/README.md.

Expected

One keyring value crawl4ai_api_token (credential crawl4ai.api_token, alias CRAWL4AI_API_TOKEN), generated with SecretGenerator("urlsafe", 32) when absent, as valkey.password and grafana.password are. It feeds two cluster Secrets: devops/crawl4ai (key CRAWL4AI_API_TOKEN, restarts Deployment crawl4ai) and devops/devops-cli (key DEVOPS_CLI_CRAWL4AI_API_TOKEN, required=False, restarts Deployment roadmap-service). The secret table of k8s/README.md lists both rows. A person runs the existing cluster-secrets command to create the Secret. The change creates no secret.

Acceptance criteria

  • A test in tests/ fails on the base: the cluster secret table holds a devops/crawl4ai row with key CRAWL4AI_API_TOKEN and the generator, and a DEVOPS_CLI_CRAWL4AI_API_TOKEN entry in devops/devops-cli, both from the same keyring value.
  • tests/invariants/test_k8s_manifests.py (secret-table rows) fails on the base and passes: both rows are in k8s/README.md.
  • devops config audit-keys (or the test that lists credentials) knows crawl4ai.api_token, and no tool parameter or MCP option takes it.
  • The token never appears in a log line or in a dry-run output.

Existing tool considered

The existing ClusterSecret, SecretEntry, SecretGenerator and KeyringSource of cluster_secrets.py. No new mechanism. Alternative: a JWT (CRAWL4AI_JWT_ENABLED) needs a signing key and a token call, and brings nothing for two internal callers.

Related

Next: the manifests issue and the client issue. Owner rule: a person creates secrets.

Activity

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

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/k8s. The (k8s) scope of the title gives the scope.
    • Priority: P2-Medium. Prerequisite for the planned Crawl4AI service but not a broken system fix; part of a sequenced set of issues.
    • Value: Medium. Unblocks the Crawl4AI service deployment but is one of several planned pieces.
    • Effort: Low. Follows the existing valkey.password and grafana.password pattern with no new mechanism.
    • Related: feat(k8s): auto-mint and synchronize argocd.token and grafana.token in deploy-stack #764, which asks for a different change. Both add a specific token to the cluster secrets system using the same SecretGenerator and keyring pattern, but for different credentials (argocd/grafana vs crawl4ai).
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 7, 2026
  4. removed
    status/in-review
    owner/agent
    on Nov 7, 2026
  5. devops-cli-service commented on Nov 7, 2026

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

    @devops-cli-service
    Contributor

    Live since 2026-11-07 12:09 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