Skip to content

Conversation

gs-kamnas
Copy link
Contributor

This change implements a series of features designed to support running this container in a distributed manner where multiple instances are running to support a single instance of LibreNMS, including:

  • Adds the DISABLE_DB_MIGRATE and DISABLE_CRON environment variable flags that may be used to disable automatic database migration as well as running cron such that these features can be run as separate Kubernetes jobs if desired.
  • Adds feature to source /data/cron-pre-hook into the shell environment if present prior to cronjob execution. This can be leveraged in combination with the leader-elector Kubernetes or a simple test of the index of the pod in a statefulset in order to ensure that only one container is running the cronjobs.
  • Adds cronjob to run laravel's scheduled tasks as it was observed that these were not being run in containerized deployments.

…loyment

Support pre-cronjob hooks to enable running cronjobs conditionally (such
as on the 0th pod of a Kubernetes statefulset).
@gs-kamnas gs-kamnas requested a review from crazy-max as a code owner January 17, 2025 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant