Skip to content

[app] Align cron lifecycle with deployment#72 (Recreate, foreground crond, console lock/watch) #25

Description

@henzigo

Context

Upstream PR shopsys/deployment#72 refined the graceful cron lifecycle beyond what phase 1 of
this chart implements. Differences worth adopting:

  1. strategy: Recreate — our cron Deployment kept the legacy RollingUpdate
    (maxSurge: 1, maxUnavailable: 0), which briefly runs two cron pods concurrently
    during the date-label-forced replacement. Recreate guarantees the old pod drains fully
    before the new one starts.
  2. crond in the foreground (exec crond -f || exec cron -f, log tail backgrounded) —
    proper PID 1 signal handling; our current command backgrounds crond and tails a FIFO as
    the main process.
  3. Console commands instead of phing in the preStop drain:
    bin/console deploy:cron:lock / deploy:cron:watch (new application interface) instead of
    phing -S cron-lock / cron-watch; lock output redirected to a file, || true guards.
  4. terminationGracePeriodSeconds: 3000 upstream vs our 3600 — align the default (pick one,
    document).

Tasks

  • strategy: Recreate for the cron Deployment
  • Foreground crond command + backgrounded log tail
  • preStop via bin/console deploy:cron:lock/watch (confirm minimum project-base version
    that ships these commands; keep phing fallback configurable if needed)
  • Align the grace period default
  • Update cron_test.yaml, golden snapshots, deviations doc
  • Re-check the cron-suspend hook interplay (scale-to-0 + Recreate)

References: shopsys/deployment#72; related: #3 (supercronic), #19 (native CronJobs — if that
lands, parts of this become obsolete)

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

    area/app-chartshopsys-app chart (workloads, ingresses, secrets, hooks)behavior-changechanges rendered manifests - regenerate golden snapshots + update deviations docenhancementNew feature or requestpriority/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions