run the check-ip cronjob every 5 minutes [ci skip]
This commit is contained in:
parent
dec0535963
commit
36091ab4c2
3 changed files with 14 additions and 1 deletions
|
|
@ -1,4 +1,6 @@
|
|||
# Module to run some infra-specific things like updating the public ip
|
||||
variable git_user {}
|
||||
variable git_token {}
|
||||
|
||||
|
||||
resource "kubernetes_cron_job_v1" "update-public-ip" {
|
||||
|
|
@ -7,7 +9,7 @@ resource "kubernetes_cron_job_v1" "update-public-ip" {
|
|||
namespace = "default"
|
||||
}
|
||||
spec {
|
||||
schedule = "* * * * *"
|
||||
schedule = "*/5 * * * *"
|
||||
concurrency_policy = "Forbid"
|
||||
job_template {
|
||||
metadata {
|
||||
|
|
@ -25,6 +27,15 @@ resource "kubernetes_cron_job_v1" "update-public-ip" {
|
|||
image = "viktorbarzin/infra"
|
||||
command = ["./infra_cli"]
|
||||
args = ["-use-case", "update-public-ip"]
|
||||
|
||||
env {
|
||||
name = "GIT_USER"
|
||||
value = var.git_user
|
||||
}
|
||||
env {
|
||||
name = "GIT_TOKEN"
|
||||
value = var.git_token
|
||||
}
|
||||
}
|
||||
restart_policy = "Never"
|
||||
# service_account_name = "descheduler-sa"
|
||||
|
|
|
|||
|
|
@ -282,6 +282,8 @@ module "excalidraw" {
|
|||
|
||||
module "infra-maintenance" {
|
||||
source = "./infra-maintenance"
|
||||
git_user = var.webhook_handler_git_user
|
||||
git_token = var.webhook_handler_git_token
|
||||
}
|
||||
|
||||
# module "metrics_api" {
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue