Skip to content

Commit f3fe7b2

Browse files
committed
feat: add drain_scheduler_enabled to run the cron scheduler in the drain
Adds a drain_scheduler_enabled variable (default false) that is passed to the drain via the spacelift-drain secret as DRAIN_SCHEDULER_ENABLED. Off by default, Postgres queue so no IAM change needed.
1 parent ac91967 commit f3fe7b2

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

outputs.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ output "kubernetes_secrets" {
234234
DRAIN_CONCURRENCY_EVENTS = var.drain_concurrency_events
235235
DRAIN_CONCURRENCY_IOT = var.drain_concurrency_iot
236236
DRAIN_CONCURRENCY_WEBHOOKS = var.drain_concurrency_webhooks
237+
238+
DRAIN_SCHEDULER_ENABLED = var.drain_scheduler_enabled
237239
})
238240
}
239241

templates/kubernetes-secrets.tftpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ stringData:
6161
DRAIN_CONCURRENCY_EVENTS: "${DRAIN_CONCURRENCY_EVENTS}"
6262
DRAIN_CONCURRENCY_IOT: "${DRAIN_CONCURRENCY_IOT}"
6363
DRAIN_CONCURRENCY_WEBHOOKS: "${DRAIN_CONCURRENCY_WEBHOOKS}"
64+
DRAIN_SCHEDULER_ENABLED: "${DRAIN_SCHEDULER_ENABLED}"

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ variable "spacelift_version" {
147147
default = ""
148148
}
149149

150+
variable "drain_scheduler_enabled" {
151+
type = bool
152+
description = "When true, the drain also runs the cron scheduler. Leave false to keep using the standalone scheduler deployment."
153+
default = false
154+
}
155+
150156
variable "drain_concurrency_async_jobs" {
151157
type = number
152158
description = "Number of concurrent receivers for the async-jobs queue per drain pod."

0 commit comments

Comments
 (0)