update dns update ip job to update technitium via api

This commit is contained in:
Viktor Barzin 2024-01-23 20:30:39 +00:00
parent 8f7ece5dac
commit 543fca5dbb
5 changed files with 222 additions and 33 deletions

View file

@ -1,6 +1,8 @@
# Module to run some infra-specific things like updating the public ip
variable git_user {}
variable git_token {}
variable "git_user" {}
variable "git_token" {}
variable "technitium_username" {}
variable "technitium_password" {}
resource "kubernetes_cron_job_v1" "update-public-ip" {
@ -23,21 +25,29 @@ resource "kubernetes_cron_job_v1" "update-public-ip" {
spec {
priority_class_name = "system-cluster-critical"
container {
name = "update-public-ip"
image = "viktorbarzin/infra"
name = "update-public-ip"
image = "viktorbarzin/infra"
command = ["./infra_cli"]
args = ["-use-case", "update-public-ip"]
env {
name = "GIT_USER"
name = "GIT_USER"
value = var.git_user
}
env {
name = "GIT_TOKEN"
name = "GIT_TOKEN"
value = var.git_token
}
env {
name = "TECHNITIUM_USERNAME"
value = var.technitium_username
}
env {
name = "TECHNITIUM_PASSWORD"
value = var.technitium_password
}
}
restart_policy = "Never"
restart_policy = "Never"
# service_account_name = "descheduler-sa"
# volume {
# name = "policy-volume"