Skip to content

Add the worker workload: authup start worker, with WORKER_ENABLED=false on API replicas #28

Description

@tada5hi

Upstream contract

Authup beta.64 exposes the background worker as a positional role of the single listener command:

authup start worker

The retired spellings authup worker, server/core worker, and authup start --worker exit 1.

  • authup start worker runs background sweeps only: no HTTP listener, no console, and no migrations.
  • WORKER_ENABLED maps to core.worker.enabled. The role requires it to be true and refuses to boot when false.
  • A normal authup start process also runs the worker components while the key is true. When a dedicated worker Deployment is enabled, API pods must therefore set WORKER_ENABLED=false and the worker pod must set WORKER_ENABLED=true.
  • The worker opens the normal database/Redis dependencies needed by its components, but never applies migrations. Start it after the migration Job.

Chart changes

  1. Add templates/worker/ with the same image and args: ["start", "worker"] (or an equivalent command array that invokes the authup binary). It has no HTTP readiness/liveness probes and exposes no port.
  2. Default to one replica. More replicas are safe for batch-claimed jobs but unnecessary for the standard deployment.
  3. When worker.enabled=true, set WORKER_ENABLED=false on the server Deployment and WORKER_ENABLED=true on the worker Deployment. Keep these as workload-local environment variables, not shared authup.yml values.
  4. Add the usual worker resources, annotations, security context, scheduling, PDB/HPA choices, and schema entries following the chart's explicit sibling-template convention.
  5. When the migration hook is enabled, set MIGRATION_ENABLED=false on the server Deployment. The worker ignores migration enablement and still must start after the Job.
  6. Update NetworkPolicy for worker egress if the selected policy does not already cover its database/Redis traffic.

No listener means the image's HTTP healthcheck must be disabled or replaced for this workload.

Activity

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions