run the check-ip cronjob every 5 minutes [ci skip]

This commit is contained in:
Viktor Barzin 2023-05-10 17:43:16 +00:00
parent dec0535963
commit 36091ab4c2
3 changed files with 14 additions and 1 deletions

View file

@ -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"

View file

@ -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.