replace ntfy notifications with slack for diun [ci skip]

This commit is contained in:
Viktor Barzin 2024-12-29 18:16:42 +00:00
parent 6d9de28b70
commit ea40805dbf
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
5 changed files with 22 additions and 46 deletions

View file

@ -71,6 +71,7 @@ variable "resume_redis_url" {}
variable "frigate_valchedrym_camera_credentials" { default = "" }
variable "paperless_db_password" {}
variable "diun_nfty_token" {}
variable "diun_slack_url" {}
variable "docker_config" {}
variable "nextcloud_db_password" {}
variable "homepage_credentials" {
@ -377,7 +378,7 @@ module "kubernetes_cluster" {
paperless_db_password = var.paperless_db_password
diun_nfty_token = var.diun_nfty_token
docker_config = var.docker_config
diun_slack_url = var.diun_slack_url
nextcloud_db_password = var.nextcloud_db_password
homepage_credentials = var.homepage_credentials

View file

@ -1,6 +1,6 @@
variable "tls_secret_name" {}
variable "diun_nfty_token" {}
variable "docker_config" {}
variable "diun_slack_url" {}
resource "kubernetes_namespace" "diun" {
metadata {
@ -17,24 +17,6 @@ module "tls_secret" {
tls_secret_name = var.tls_secret_name
}
resource "kubernetes_config_map" "docker-config" {
metadata {
name = "docker-config"
namespace = "diun"
labels = {
app = "diun"
}
annotations = {
"reloader.stakater.com/match" = "true"
}
}
data = {
"config.json" = var.docker_config
}
}
resource "kubernetes_service_account" "diun" {
metadata {
name = "diun"
@ -122,41 +104,34 @@ resource "kubernetes_deployment" "diun" {
}
// ntfy settings
env {
name = "DIUN_NOTIF_NTFY_ENDPOINT"
value = "https://ntfy.viktorbarzin.me"
}
# env { // disabled as if this fails, no other notifications are sent
# name = "DIUN_NOTIF_NTFY_ENDPOINT"
# value = "https://ntfy.viktorbarzin.me"
# }
env {
name = "DIUN_NOTIF_NTFY_TOPIC"
value = "diun-updates"
}
# env {
# name = "DIUN_NOTIF_NTFY_TOKEN"
# value = var.diun_nfty_token
# }
env {
name = "DIUN_NOTIF_NTFY_TOKEN"
value = var.diun_nfty_token
name = "DIUN_NOTIF_SLACK_WEBHOOKURL"
value = var.diun_slack_url
}
env {
name = "LOG_LEVEL"
value = "debug"
value = "info"
}
env {
name = "DIUN_WATCH_FIRSTCHECKNOTIF"
value = "true"
}
# env {
# name = "DIUN_WATCH_FIRSTCHECKNOTIF"
# value = "true"
# name = "DIUN_NOTIF_NTFY_TIMEOUT"
# value = "10s"
# }
env {
name = "DIUN_NOTIF_NTFY_TIMEOUT"
value = "10s"
}
volume_mount {
name = "docker-config"
mount_path = "/root/.docker/config.json"
sub_path = "config.json"
}
}
volume {
name = "docker-config"
config_map {
name = "docker-config"
}
}
}
}

View file

@ -58,7 +58,7 @@ variable "resume_redis_url" {}
variable "frigate_valchedrym_camera_credentials" { default = "" }
variable "paperless_db_password" {}
variable "diun_nfty_token" {}
variable "docker_config" {}
variable "diun_slack_url" {}
variable "nextcloud_db_password" {}
variable "homepage_credentials" {}
variable "authentik_secret_key" {}
@ -509,7 +509,7 @@ module "diun" {
source = "./diun"
tls_secret_name = var.tls_secret_name
diun_nfty_token = var.diun_nfty_token
docker_config = var.docker_config
diun_slack_url = var.diun_slack_url
}
module "meshcentral" {

Binary file not shown.

Binary file not shown.