add notification when ip changes
This commit is contained in:
parent
5bcd6352d4
commit
e14c9c7517
6 changed files with 81 additions and 1 deletions
42
modules/kubernetes/infra-maintenance/main.tf
Normal file
42
modules/kubernetes/infra-maintenance/main.tf
Normal 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"
|
||||
# }
|
||||
# }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue