add notification when ip changes

This commit is contained in:
Viktor Barzin 2023-05-10 17:21:47 +00:00
parent 5bcd6352d4
commit e14c9c7517
6 changed files with 81 additions and 1 deletions

View file

@ -0,0 +1,42 @@
# Module to run some infra-specific things like updating the public ip
resource "kubernetes_cron_job_v1" "update-public-ip" {
metadata {
name = "update-public-ip"
namespace = "default"
}
spec {
schedule = "* * * * *"
concurrency_policy = "Forbid"
job_template {
metadata {
name = "update-public-ip"
}
spec {
template {
metadata {
name = "update-public-ip"
}
spec {
priority_class_name = "system-cluster-critical"
container {
name = "update-public-ip"
image = "viktorbarzin/infra"
command = ["./infra_cli"]
args = ["-use-case", "update-public-ip"]
}
restart_policy = "Never"
# service_account_name = "descheduler-sa"
# volume {
# name = "policy-volume"
# config_map {
# name = "policy-configmap"
# }
# }
}
}
}
}
}
}

View file

@ -280,6 +280,9 @@ module "excalidraw" {
tls_secret_name = var.tls_secret_name
}
module "infra-maintenance" {
source = "./infra-maintenance"
}
# module "metrics_api" {
# source = "./metrics_api"